Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Crafty hash table question

Author: Alvaro Jose Povoa Cardoso

Date: 04:41:03 09/28/03

Go up one level in this thread


On September 27, 2003 at 21:59:24, Robert Hyatt wrote:

>On September 27, 2003 at 07:46:36, Alvaro Jose Povoa Cardoso wrote:
>
>>
>>I'm a bit confused about the index 'hwhich' computation on the
>>'htable->always[hwhich]'
>>Could someone please explain the following crafty code?
>>   hwhich=((int)temp_hashkey>>log_hash)&1;
>>
>>Why do we need '>>log_hash'
>>Couldn't it also be done with:
>>   hwhich=((int)temp_hashkey)&1;
>>
>>Thanks in advance,
>>Alvaro Cardoso
>
>
>The above change would work.  However, when I converted from the old two-table
>approached to the current modified one-table approach, I wanted _exact_ node
>count matches.  This guarantees that by using the same bit that the older
>approach used with a 1-bit larger table address...

The bit that indexes always[] ends up being the MSB (left most bit) right?

Alvaro Cardoso




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.