Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Mixing 0x88 and bitboards

Author: Tony Werten

Date: 14:17:04 06/25/02

Go up one level in this thread


On June 25, 2002 at 17:04:43, Robert Hyatt wrote:

>On June 25, 2002 at 16:35:26, Gian-Carlo Pascutto wrote:
>
>>On June 25, 2002 at 14:26:37, Russell Reagan wrote:
>>
>>>On June 25, 2002 at 05:07:26, Gian-Carlo Pascutto wrote:
>>>
>>>>Hrmpf. In my experience, there are many things
>>>>that are both faster and easier to evaluate via
>>>>a classic approach.
>>>
>>>Could you give some examples of things that you have found that can be
>>>calculated faster using the classic approach?
>>
>>'Is there a white pawn on e6?'
>>
>>if (board[E6] == wpawn)
>>
>>1 load
>>1 compare
>>
>>if (WhitePawns & Mask[e6])
>>
>>2 64-bit loads
>>1 64-bit and
>>1 64-bit compare
>>
>>--
>>GCP
>
>
>What about more commonly:  Is the black pawn on e6 passed.  Now you have
>to check 12 squares...  d2/e2/f2, d3/e3/f3, d4/e4/f4, d5/e5/f5.
>
>Bitmaps:  two loads one and.  No compare.  Just a branch not zero.
>
>traditional...  12 loads 12 compares.
>
>Asking simple questions with bitmaps is not so good on 32 bit machines.  On
>a 64 bit machine, your above becomes
>
>1 load.  1 mask create (set 1 bit and shift, two instructions, done in the
>"shadow" of the load, then one compare.
>
>On a 64 bit machine, they are equally fast for the simple operation.  For
>the second case, the 64 bit machine is an easy winner.

No, this is 1 pawnhashtable lookup. Don't care how you got the information you
put in the hashtable, because of the hitrate that's not important.

Bitboards are best for pawns (imo) but because of the hashtable, it's not that
important. (Altough "is this rook behind and not in front of a passed pawn"
would save me some time with bitboards instead of what I'm doing now.

Tony




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.