Author: Robert Hyatt
Date: 18:30:12 02/21/00
Go up one level in this thread
On February 21, 2000 at 21:10:12, Sanjiv Karnataki wrote: >Hi, > >Re hash tables: > >a) I have noticed crafty uses two hash tables. why is that? Is it to handle >collisions by providing an extra bucket per key and thereby increasing hash >hits? If that is correct, does anyone here know how much benefit that provides >in terms of increase %hits? It is based on the same principle as 2-way set associative cache. You hash to a 'bucket' but the bucket holds two entries. > >b) Another thing about crafty: it stores 16 bytes in the hash table, 64 of which >are used to match the hashkey for verification. the other 64 are used to store >suggested move, score, score type etc. All very standard, _but_ while storing >the hash key it does not store it directly but instead stores the hashkey XOR >other 64bits of hash entry. What benefit does that provide? You need to search the archive for that. It is complex, but has to do with being able to store a hash entry without locking, in an SMP environment. > >Thank you in advance. > >Sanjiv.
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.