Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: oops here's a better version...

Author: Severi Salminen

Date: 05:41:55 01/15/02

Go up one level in this thread


>On my computer, bsf is faster if the 1-bit is less significant and bsr is faster
>if the 1-bit is more significant, so the FirstBit() and LastBit() versions with
>the jumps are running faster on average. How does this test on other processors?
>I'm curious...

You should check from processor specs, if bsr/bsf takes constant amount of
cycles or not. If not, then jumping is very wise thing to do. Otherwise the
opposite might be true. Then second thing is that adding and removing
instructions might cause misalignements and code will run faster/slower even if
it _should_ be slower/faster. So you should really check how many cycles bsr/bsf
takes on your processor (which is?)

Severi



This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.