Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Mixing 0x88 and bitboards

Author: Gian-Carlo Pascutto

Date: 22:17:17 06/25/02

Go up one level in this thread


On June 25, 2002 at 20:01:03, Robert Hyatt wrote:

>On June 25, 2002 at 17:27:43, Gian-Carlo Pascutto wrote:
>
>>On June 25, 2002 at 17:04:43, Robert Hyatt wrote:
>>
>>>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.
>>
>>More like...1 load 1 compare.
>
>How will you check 12 squares with one load and one compare???

The pawn hash table will tell me if there is a passer on this
file. Typical case (not) is 1 load and 1 compare. If there is a passer,
two more loads and compares may be needed.

>>
>>>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.
>>
>>At 32 bits, the nonbitboard approach wins out. At 64 bits, it's still
>>'better' (not slower and uses less functional units).
>
>
>I don't agree there.  At 64 bits, I do one 64 bit load and answer the
>question.

You don't. You can do the mask create at the same time as the load,
but that doesn't make it go away. It's still tying up an execution
unit that could be used for other means.

>I don't see how you can beat that with 32 bits.  If you are
>doing bitmapping on 32 bits, you might by knowing which half to load,
>but a 32 bit load and a 64 bit load take exactly the same amount of time.

But the AND and test don't. (you can also do those on a 32-bit half)

>>I'm not saying there aren't things that are faster with bitboards,
>>I'm just saying there certainly are things that are faster without.
>
>No doubt that is true.  But if things break even on 32 bit machines,
>then 64 bit machines change that in favor of the bitmap programs, by
>some positive amount open to debate.

One could argue whether they really break even. Comparing the
two approaches is hard.

--
GCP



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.