Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Speedups for BitBoard programs on 64-bit machines

Author: Eugene Nalimov

Date: 18:22:44 06/06/02

Go up one level in this thread


Two months ago you posted here tens of messages in which you "proved" that it is
completely impossible to write the multi-threaded program without 10%
performance loss on x86. When I at last understood your problem it took me
exactly 15 seconds to find out the solution.

Probably you should say not "completely impossible", but "for me it is
completely impossible?" :-)

Another example. Recently you argued that 64-bit FindFirst() is very inefficient
on x86 due to the anavoidable branch. If you'll look at the Crafty source (file
x86.s) you can find out version of FindFirst() that does not contain such a
branch (it contains a branch for the case when the entire 64 bits are zero, but
that is never a case in Crafty, so that branch is correctly predicted as "not
taken" by the hardware). Somebody noticed that version with branch is *faster*
on PIII, at least when function is inlined, probably due to fact that on
neighbour positions there are good chances that exactly the same bits are set. I
did not tested that on P4, but Bob can always return to the branchless version.

It looks that you can play chess and even write good chess program, but cannot
reasonable discuss advanced questions of computer science.

Regards,
Eugene

On June 06, 2002 at 20:57:14, Vincent Diepeveen wrote:

>On June 06, 2002 at 20:35:03, Robert Hyatt wrote:
>
>I wrote 20 pages of explanation with examples what
>is completely impossible to do in bitboards very
>fast in my evaluation, about a year ago (bit less).
>Then you said: "well i don't need that info for my
>evaluation, so bitboards is ok for me".
>
>That's a choice you make. But please don't do as if you have
>forgotten again those 20 pages. If you don't need a better
>evaluation, but only a very elementary basic bean counter
>evaluation, then that's your choice.
>
>My choice is doing more in evaluation, and i can't use
>bitboards for that.
>
>Best regards,
>Vincent
>
>>On June 06, 2002 at 19:47:14, Vincent Diepeveen wrote:
>>
>>>On June 06, 2002 at 10:25:25, Robert Hyatt wrote:
>>>
>>>>On June 05, 2002 at 17:31:45, Gerd Isenberg wrote:
>>>>
>>>>>On June 05, 2002 at 13:22:30, Vincent Diepeveen wrote:
>>>>>
>>>>>>On June 05, 2002 at 04:14:41, Gerd Isenberg wrote:
>>>>>>
>>>>>>Gerd, a 33% speedup isn't much if you first slow down 2 times.
>>>>>>Right now the crafty datastructure is exactly 2 times slower doing
>>>>>>what i can do without bitboards.
>>>>>>
>>>>>
>>>>>Vincent, if, as you claim, bitboarders are two times slower per se on 32bit
>>>>>hardware, then i expect a speedup of >= 100% with bitboards on 64bit hardware.
>>>>>
>>>>>Gerd
>>>>
>>>>
>>>>This argument goes in circles, because he also claims they are not very
>>>>good on 64 bit machines either...
>>>
>>>Not really. the problem is the bitboarders have a different goal it seems.
>>>If all you want is a Sum(squaresattacked) as mobility function, then sure
>>>bitboards are an interesting thing to use at 64 bits processors. If you want
>>>more, then bad luck with bitboards. Factor 2 slower.
>>
>>based on what?  Your lack of experience with them or proof that there are
>>some things that bitboards can't do?  I know the latter is not true...
>>
>>Why do you want to waste so much time trying to explain why this approach
>>is bad, when you have not tried it yourself.  It takes time to get used to
>>it.  once you do, you discover that a lot of those "problems" are imaginary
>>only.
>>
>>
>>
>>>
>>>At 64 bits processors 33% faster, still like 1.6 times slower.
>>>
>>>Best regards,
>>>Vincent
>>
>>
>>Again, what single cpu machine at 1ghz can run crafty at 1.5 M nodes per
>>second?  Absolutely none unless we go to a Cray.  Or a Mckinley 64 bit
>>processor...



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.