Author: Gerd Isenberg
Date: 15:29:31 05/04/05
Go up one level in this thread
i even forgot to or "foo" for movegen purpose, so bsf is even more worse in my
dumb test:
>pattern #bits Matt Intr. % slower
>0xffffffffffffffff 64 bit 488 729 49%
>0xff00ff00ff00ff00 32 bit 263 392 49%
>0x0000000000000001 1 bit 29 40 38%
>0x1234567887654321 26 bit 219 329 50%
>
>Cheers,
>Gerd
>
>
>int serialize(BitBoard bb, int sq[], int foo)
>{
> unsigned long idx;
> unsigned int b = (int)bb;
> int n = 0;
> while ( _BitScanForward(&idx, b) )
> {
> sq[n++] = idx | foo;
> b &= b-1;
> }
> b = (int)(bb>>32);
> while ( _BitScanForward(&idx, b) )
> {
> sq[n++] = (idx+32) | foo;
> b &= b-1;
> }
> return n;
>}
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.