Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Simple Hash Table Question

Author: Robert Hyatt

Date: 12:11:23 05/24/04

Go up one level in this thread


On May 24, 2004 at 06:07:10, Pham Hong Nguyen wrote:

>[snip]
>>I don't even allow a duplicate into the always-store table, if there is an entry
>>in the depth-preferred table with a matching signature.  IE position X is in one
>>or the other but not both...
>
>I have just taken a look at your code of HashProbe:
>
>  /* Part 1 (first table?) */
>  if (word2 == temp_hashkey)
>    do {
>       if (...) break;
>    while(0);
>
>  /* Part 2 (second table?) */
>  word2 =...;
>  if (word2 == temp_hashkey) {
>  }
>
>I don't understand the break and while in the part 1 - they may be ineffective.
>If there is no duplicate of two tables, when the hash key matches the first, it
>cannot match the second. Thus, exit the function (return) should be better than
>continue to check the second table.
>
>Do I miss something?


Let me study that tonight.  I whacked that part of the code up extensively for
the hash collision paper.  It is possible that I left something in that was not
needed.  Or even vice-versa.  :)




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.