Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Hash table usefulness

Author: Uri Blass

Date: 02:04:31 11/25/01

Go up one level in this thread


On November 24, 2001 at 20:35:34, Robert Hyatt wrote:

>On November 24, 2001 at 18:02:59, Jesper Antonsson wrote:
>
>>This is speculation, as I'm not a chess program author myself, but I wonder if
>>anyone has experimented recently and could explain things to me.
>>
>>Machines of today has a tremendous memory bottleneck and I asked myself the
>>other day how come the large hash tables used today are beneficial. I remember
>>figures from long ago when hash tables were said to give a speedup of perhaps
>>3%, but today when processors are 10-20 times faster than main memory, they
>>should give less, perhaps even be detrimental? If you turn of hash tables
>>entirely, how much of an increase does this give in NPS on a 1 Ghz+ processor?
>>Nothing? A lot?
>
>Hash tables have _nothing_ to do with NPS.  They have a _lot_ to do with
>the size of the tree that is searched.  IE try a fixed-depth search (say to
>12 plies) and vary the size of the hash table from small to large.  The size
>of the tree will vary by 2-3X, which is a _significant_ advantage in terms of
>speed.  Even though the raw NPS stays pretty much constant..
>
>
>>
>>Has anyone experimented with small hashtables, carefully tuned to fit in  cache,
>>and used perhaps only in shallow parts of the tree, and compared the results to
>>the standard "use as much as you have"-approach? *Especially* in lightning
>>games, where a huge hash table won't be filled anyway, a cache-tuned table could
>>perhaps perform better?
>
>
>It would be way too small and get overwritten at a ridiculous rate.
>
>
>
>>
>>And by the way, does anyone bother to try to make sure his/her engine itself
>>fits in instruction cache and that the search-function is so aligned that it
>>won't get pushed out of instruction cache by more seldomly used functions?
>>
>>br,
>>Jesper
>
>
>Most likely everybody does this...


I guess that everybody is not correct.
There are a lot of weak engines and I believe that most of the engines are more
than 100 elo weaker than Crafty.

I doubt if the programmers of the weaker engines care about these improvements.

I have things to improve in the algorithm of my move generator without caring
about the question if my move generator fits in instruction cache.


My move generator is big and complicated and I wonder if I can improve the speed
of it by making it smaller inspite of the fact that it is going to use more
commands.

I looked for the file movei.exe(the name of the project that contains all the
source code of the files of my move generator).

I get the following numbers:
size: 60 kbytes(61,440 bytes)
size on disk: 64 kbytes(65,536 bytes)

I can do it slightly smaller without reducing speed but I suspect that the main
reduction that I can get in size can be done only by increasing the number of
steps that the computer needs to do.

Uri





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.