Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Simple Hash Table Question

Author: Pham Hong Nguyen

Date: 03:07:10 05/24/04

Go up one level in this thread


[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?



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.