Computer Chess Club Archives


Search

Terms

Messages

Subject: Data structures question for hash tables

Author: Dann Corbit

Date: 16:01:01 01/18/99


I am curious as to how most computer chess writers constuct their hash tables.
I suspect it may be something like this:

Using a hash function, like zobrist, compute an n-bit hash that maps to a 2^n
hash table.  For each hash, store collisions in a linked list.

If that is the case, then I have a suggestion that could improve speed when
there are lots of collisions.  Instead of an ordinary singly linked list, use a
skiplist.  Then, when you have a list longer than one, you can find the data
object in log[base2](n) operations {where n is the length of the collision
chain}, and it only costs about .25 pointer per element.  Or am I totally all
wet?



This page took 0.01 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.