Author: Robert Hyatt
Date: 13:28:57 09/24/03
Go up one level in this thread
On September 24, 2003 at 13:25:49, Leen Ammeraal wrote: >On September 24, 2003 at 11:49:58, Robert Hyatt wrote: > >>On September 24, 2003 at 11:20:13, William Penn wrote: >> >>>For example, is 512MB hash table size really better than 513MB (512+1), or >>>better than 528MB (512+16)? >>> >>>Another example, is 768MB (3x256) better than 784MB (3x256+16)? >>> >>>I'm also wondering if these old rules (truisms) regarding optimum numbers for >>>hash table size only apply to the Windows 9x/Me op systems which had problems >>>with allocation of resources? I'm doubtful that they still apply to 2000/XP op >>>systems. >>> >>>Does anyone really know? >> >>The point is a bit of speed. You have to convert a hash signature into a >>hash table index. For a tablesize that is a power of 2, you can simply >>AND (mask) off the upper bits leaving a power-of-2 table index. For other >>sizes, you will end up doing a divide (mod) to get the remainder. The divide >>is not fast. >> >>How significant this is is debatable, but for some of us, "every cycle counts." >> >> >I agree that masking is to be preferred to the modulo operation. >However, what about tournaments (organized by others) that >allow a hash table size which corresponds to, for example, >12 MB entries in your table? >It seems not wise to me to use only 8 MB entries in this case >just to make the table length a power of 2. In my case, I do it a bit differently, anyway. I hash to a bucked of 3 entries, 48 bytes. this lets me set my hash table size to 3/4 of a power of 2. IE hash=12M, 24M, 48M, etc. That leaves 1/4 of memory free for the OS and the other pieces of the chess engine, including pawn hash, egtb cache, etc. I try to use _most_ of main memory for serious games, and if you have a 1 gig machine, I generally use something like hash=784M, hashp=40M, cache=128M, and go from there... > >Leen Ammeraal
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.