Author: Sune Fischer
Date: 05:56:46 12/05/02
Go up one level in this thread
On December 05, 2002 at 08:51:14, Russell Reagan wrote:
>On December 05, 2002 at 08:20:35, Sune Fischer wrote:
>
>>hey Russell, have you tried it without the table?
>
>I did, but it was slower when I ran it like that. It ran in about 60 seconds I
>believe, and the table version took 41. It might just be an issue of caching and
>could be different on different processors though. Did you see which was faster
>for you?
>
>Russell
I rewrote it to this:
register uint offset;
register uint result;
register uint32 bits;
result = (bb > 0xffffffff) << 5;
bits = bb >> result;
offset = (bits > 0xffff) << 4;
bits >>= offset;
result += offset;
offset = (bits > 0xff) << 3;
bits >>= offset;
result += offset;
offset = (bits > 0x0f) << 2;
bits >>= offset;
result += offset;
offset = (bits > 3) << 1;
bits >>= offset;
result += offset;
result += (bits > 1);
return result;
But apparently there is a bug in it.
-S.
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.