Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Rough comparison between rotated bitboards and 0x88

Author: Robert Hyatt

Date: 18:36:46 06/19/00

Go up one level in this thread


On June 19, 2000 at 20:10:30, Dann Corbit wrote:

>On June 19, 2000 at 19:57:19, James Robertson wrote:
>>On June 19, 2000 at 19:37:14, Andrew Dados wrote:
>[snip]
>>>Even worse news: When I went down to asm as you did for bitboards, I was able to
>>>speed up capture detection for 0x88 by some 66% :)
>>
>>This is amazing.... did you improve the algorithm, or just are you 66% smarter
>>than the compiler? If you say the latter, expect to have many people asking you
>>to make sure optimizations are on when you recompile the C++ version. :)
>
>Almost astonishing.  I would like to know the compiler and settings that were
>used.  Ten years ago, you could almost always double the speed of a C program by
>an assembly rewrite, but I find that it is very difficult to improve on the
>modern optimizing compilers of today by a significant amount.

This is not so astonishing. You know things that the compiler has no hope
of knowing.  IE in a 64 bit shift, it has to look for shifts 64 bits or more.
I _know_ I don't do any 64 bit shifts.

In Cray Blitz, my CAL code is about 4x faster than the output of Cray's FORTRAN
compiler, which is arguably the best optimizing FORTRAN compiler on the planet,
based on the literature.  Why?

I know what needs to be saved (registers) across function calls.  The compiler
doesn't.  I know about the 'range' of variable values.  The compiler doesn't.
I know that on most switch (computed GOTO in fortran) the default case never
happens so the out of bounds check is not needed.  The list goes on and on and
on...






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.