Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Bitscan

Author: Walter Faxon

Date: 11:49:37 02/11/03

Go up one level in this thread


Yay, Matt!

I'm probably not going to get a chance to closely examine your work again soon,
but here's a little doc. problem:  "...converts it to an index counting up from
0 to 31..." should of course be 0 to 63.

Also, for the C routine after:

    #ifdef __LSB_USE_C_INLINE
    #define __LSB_USE_TABLE
    static _INLINE _I32_TYPE BitSearchResetInternal(_LSB_I64 *bb)

I don't see where you're resetting the bit.

Once you're satisfied with everything you should encourage chess programmers to
experiment with your routines and give you some feedback.  For example, IIRC,
Uri said that the table version was definitely faster than the bsf version when
run in test mode, but slower when run inside his program.  He attributed this to
his using a lot of loops with the former's larger code size greatly increasing
his program's cache footprint.  (Maybe he somehow duplicated the table for each
loop or routine??  That would lead to cache misses.)

Also, you might consider promulgating your results to other sites on
bit-fiddling tricks, e.g., Magic algorithms from The Aggregate
(http://aggregate.org/MAGIC/).  They probably want pure C versions.

Anyway, thanks again!  I'm sure your work will help a lot of people.  Well, a
few dozen, anyway!

-- Walter



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.