Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Problems with BitBoards?

Author: Roberto Waldteufel

Date: 10:44:33 01/13/99

Go up one level in this thread



On January 13, 1999 at 07:19:54, Ernst A. Heinz wrote:

>On January 13, 1999 at 06:13:30, Vincent Diepeveen wrote:
>>
>> [...]
>
>Vincent,
>
>As usual you spread your own fallible impressions and interpretations
>in a style that suggests they are proven facts. But indeed they are *not*.
>
>The "problems" (rumors?) you allude to in the post only show that you have
>*not* understood what bitboards are capable of and how to handle them
>effciently. You are of course free to criticize Bob's coding style and his
>design decisions in "Crafty". However, only inexperienced and narrow-minded
>people draw general conclusions from just a single example (i.e. the source
>code of "Crafty"). There are many ways to do things differently with bitboards
>and rotated bitboards than in "Crafty". Overall, your post mainly elaborates
>on some of Bob's design decisions which you deem non-optimal.
>
>The only real disadvantage of bitboards at the moment is the obvious penalty
>of 64-bit integers on 32-bit CPUs which comes hand in hand with unfortunately
>limited compilers and programming environments.
>
>=Ernst=

Hi Ernst,

I found bitboards were faster even on 32-bit Pentium II machine, but then I do
try to do everything possible to tweak performance which ever method I use. For
chess, speed is so important, and I don't think many compilers can really match
the efficiency of assembler for some of these tasks. Interestingly, the
Pentium's MMX registers seem not to be used much, but I have found them quite
useful for bitboard operations. If I need to do several AND, OR, XOR, ANDN or
shift operations, I try to keep the bitboards in MMX registers while this is
done, so I can perform 64-bit operations without splitting the bitboard in half.
Only when I want to scan the bits do I feed the two chunks to standard 32-bit
registers to use the fasr bit-scan instructions, which are not available for MMX
registers (pity). There are many things that cannot be done in MMX registers,
but for logical operations they are a great way of reducing memory access, which
tends to be the main bottleneck in my experience. Even with efficient cache
usage, registers are always faster.

Best wishes,
Roberto



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.