Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: De Bruijn Sequence Generator

Author: Russell Reagan

Date: 13:48:04 12/30/03

Go up one level in this thread


On December 30, 2003 at 16:14:58, Gerd Isenberg wrote:

>Currently for Athlon-32 i still use inline assembler version with jnz after
>lower bsf! With my "new" Opteron-Approach with a complete different bitboard
>infrastructure with respect to (SSE2) fill-algorithms, i will try to avoid
>bitscan at all and to extract bits with x & -x only.
>
>Therefore my interest to find a fast hashfunction for move indices.

Hi Gerd,

Nice to see you are still working on these kinds of things. I have a question.
It seems like a simple bitscan and table lookup would be very fast already. Is
your new approach significantly faster? For instance, this seems fast to me
(especially on 64-bit hardware):

Bitboard hash_key_lookup_table[64];
int lsb ( Bitboard b ); // returns least significant bit

// Compute from_bb and to_bb using x & -x trick in move generation function

move->from_bb = ...;
move->to_bb   = ...;

// In your make move function to update the hash key...
hash_key ^= hash_key_lookup_table[ lsb(move->from_bb) ];
hash_key ^= hash_key_lookup_table[ lsb(move->to_bb) ];



This page took 0.01 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.