Author: Robert Hyatt
Date: 19:57:08 02/09/03
Go up one level in this thread
On February 09, 2003 at 22:51:25, Tom Kerrigan wrote: >On February 09, 2003 at 21:41:08, Russell Reagan wrote: > >>Perhaps the questions I ask are only asked out of ignorance, but how can the >>hash table be considered to be used "infrequently"? Also, if you look at a > >If a program does a hash lookup at every node, that's a couple of memory >accesses per couple thousand instructions. If hash lookups aren't done in the >quiescence search, you could go for tens (possibly hundreds?) of thousands of >instructions per memory access. That's not frequent access. > >>program like Crafty, it makes use of lookup tables that exceed 256kb of memory >>that are used at every node (until captures). Why is this not considered to be >>in the program's "working set"? > >First, because it's a lookup table, you only want a few bytes from the table, >not the entire 256+ KB. Second, you may _never_ need to access some (or most) of >the table. Third, if the table isn't accessed in the quiescence search, again, >you can go for tens of thousands of instructions without accessing it. I just ran a quick test. I set up an array of the same size as the four 128kb tables used for move generation. I set all elements to 0, and then everywhere I do a lookup (which is thankfully done in a single procedure so it was easy to change) I incremented the corresponding counter. I ran the kopec test for 10 seconds per move, and after every position, I dumped the total number of entries that were used < 10% as often as the most often used entries, and this number was surprisingly small, meaning _most_ of the attack tables are used very frequently. Mine are used each time I generate a move for _any_ single piece on the board, whether it is in normal or q-search. I conclude that the tables are important enough to certainly be considered a part of any reasonable "working set" as a result... > >Just to give you an idea of working sets and how much data is acutally used most >of the time by chess programs, consider TSCP. It has over 40K of tables and its >executable is 150K, yet it scales perfectly with clock speed on the original >Pentium. That means its working set is less than 8K for code and 8K for data. > >-Tom
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.