Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Replacement shemes

Author: Ricardo Gibert

Date: 11:26:39 07/27/03

Go up one level in this thread


On July 27, 2003 at 13:58:26, Vincent Diepeveen wrote:

>On July 27, 2003 at 13:51:28, Sune Fischer wrote:
>
>Hello,
>
>Here what i write every few months in CCC. Because it is a few lines i will do
>it again.
>
>use a hashtable with n entries.
>
>then find index hashkey%n;


Try:

index = (hashkey&0x00000000ffffffff)*n>>32;   [untested]

Note the shift by 32 ought to be optimized away completely.


>
>%n is slower than a multiplication or an AND or a divide, but it's faster than a
>divide and multiplication and sub.
>
>Then sequential try 8 positions in a row. If each position is just 16 bytes that
>makes 128 bytes. About the cache line length at the average supercomputer or a
>P4. And just 2 cache lines of K7. I do not know about opteron. I guess it's also
>128 bytes cache line length?
>
>Anyway just always replace the smallest depth out of those 8 positions.
>
>This works very well.
>
>If you want to keep inside 64 bytes then try 4 probes. I found by experimental
>data that 8 probes was optimal for DIEP.
>
>Best regards,
>Vincent
>
>>
>>I've been trying some different hash schemes, and the one
>>that should be the best completely fails to solve a few positions.
>>
>>Currently I use two tables, one of the criterias is to replace if it is the
>>same key (so I don't get the same key in both tables, same philosophy as with
>>killers moves), but only if the depth is greater or equal.
>>
>>For some reason this fails on fine70 and similar positions.
>>If I do always replace on top of _the same_ key, then it works fine!?
>>I don't see the logic in that, and I'd really prefer to keep the deeper entry,
>>obviously.
>>
>>Could this indicate a bug, or can it be explained/fixed?
>>
>>Currently I'm trying replace if LOWER bound (beta cut) or deeper, seems to work
>>well also, I still don't get it though.
>>
>>-S.



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.