Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Pawn hashing without Zobrist keys

Author: Gerd Isenberg

Date: 05:55:54 09/13/03

Go up one level in this thread


<snip>

>>>Why?
>>>
>>>Do you think that it is faster to compute all of this information and not to
>>>remember it from the hash tables?
>>
>>I'm not sure. There is always this conflict between pure register computation
>>and storing in memory. Using more memory increases the probability of cache or
>>even more expensive tlb misses.
>>
>>Another issue is that pure register computation hides memory latency.
>>
>>>
>>>Note that you do not need to remember the information as bitboard and you may
>>>simply remember information like number of passed pawns and squares of passed
>>>pawns.
>>>
>>
>>I prefere fixed sized bitboards.
>
>What is the advantage?
>often the number of passed pawns is going to be 0 and in this case
>using 64 bit number is more expensive(maybe except some machines of the future).
>

Because of the fixed size, independent how many passers are on board.
I store white and black passers in one bitboard, need one AND to separate them
and need one further AND to get outside passers.

I like it to use bitboard metrics as long as possible, e.g. for passers looking
for blockades and controls of stop and far-stop squares.

>Even if the number is bigger than 0 then reading the squares from the hash seems
>to me less expensive than calculating the squares by firstone function.

What is the maximum number of passers? I don't care.

Of course the effectivity of bitboard operations is depending on the popularity
of the bitboards. The more bits are set, the more you gain from parallel
computation.

Unfortunately in chess you don't always have a lot of passers if any, or eight
queens :-(

But that's one of the design principle of bitboards.
Unless popcount is zero, don't care about the popularity of any property set.
Simple do bitwise computation most likely unconditionals.

>
>Unlike you
>I have no intuition here because I know that intuition tells me thing that are
>wrong.
>

It's a tradeoff. If you store color to move, is it necessary to store even the
opposite color or to calculate it xor "1"? It depends...

>intuition tells me that checking if a 32 bit number is 0 should take more time
>than checking if  a 8 bit number is 0 because you need to do 32 checks in the
>first case and 8 checks in the second case.

hehe, intuition is a rather individual issue.

>
>I know that it is not the case because things are done parallel
>but even here I think that if you check if 8 bit number is 0 then you can do
>more things parallel and I do not understand why there is no general rule that
>comparing 8 bits is faster than comparing 32 bits.
>

For me it's obviously that working with processors native word length gains best
performance.

Gerd



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.