Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: hash collisions

Author: Robert Hyatt

Date: 11:04:45 07/10/02

Go up one level in this thread


On July 10, 2002 at 12:09:05, Georg v. Zimmermann wrote:

>On July 10, 2002 at 10:38:46, Robert Hyatt wrote:
>
>>On July 10, 2002 at 03:19:38, Gian-Carlo Pascutto wrote:
>>
>>>On July 09, 2002 at 17:59:17, Robert Hyatt wrote:
>>>
>>>>Seems that the search is far more resistant to such errors than anybody has
>>>>thought previously.
>>>
>>>'I told you so!'
>>>
>>>Many times, even. Each time you all get off and scare someone who uses
>>>32-bit hashing to death. Hah!
>>>
>>>--
>>>GCP
>>
>>
>>Just because things have gone "well" in the testing so far, doesn't mean
>>a hash error won't break something, somewhere.  64 bit hash signatures are
>>cheap enough to be worthwhile insurance...
>
>Do you really use 64 bits ?
>
>  temp_hashkey=(wtm) ? HashKey : ~HashKey;
>
>// this gets the possible hash entry, it checks around 24 bits for a 4MB table
>  htable=trans_ref_a+((int) temp_hashkey&hash_maska);
>  word1=htable->word1;
>  word2=word1^htable->word2;
>// this one checks another 32bits
>  if (word2 == temp_hashkey) do {
>
>that leaves 8 bits unchecked, or what am I missing ?
>
>
>Georg


Look at what I store in the table... the _entire_ 64 bit hash signature.
I use the rightmost N bits (N=log2(tablesize)) to compute a table address,
but then I compare _all_ 64 bits of the current signature to the 64 bits
of the stored signature before I call it a "match".

I don't follow your "8 bits unchecked" at all...



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.