Thread: hash table size
View Single Post
  #10  
Old February 22nd 08, 02:18 AM posted to rec.games.chess.computer
Andy Walker
external usenet poster
 
Posts: 70
Default hash table size

In article ,
David Richerby wrote:
In a well-written engine, the optimal hash table size really is `as
big as you can have it without swapping.'


Whoa, it's not *quite* as simple as that.

(a) Even in a well-written engine, you may want/need to "clear
out" the table from time to time. Initialising several terabytes
may take a little while even on a modern machine ....

(b) Some of the standard operations on a hash table involve
indexing and finding remainders modulo the table size. These may
be more efficient if the table size is a power of 2, and if the
relevant numbers fit into [in C terms] ints rather than longs.

(c) If you manage to lock down all, or most, of the storage of
a machine, you may perhaps be unpopular, in a multi-user environment,
with other users of the machine. *Your* program may not be swapping,
but *theirs* are! [Even on a home PC, the other users may be *you*,
trying to run other things, such as the engine that this program is
playing against.]

--
Andy Walker
Nottingham
Ads
 

Cheap Electricity - Remortgages - Repair Bad Credit - Mortgage Loans - Mortgage insurance