Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Bitboards with BSF/BSR

Author: Wylie Garvin

Date: 18:23:51 12/11/01

Go up one level in this thread


On December 11, 2001 at 21:07:35, Dann Corbit wrote:

>On December 11, 2001 at 20:49:15, Wylie Garvin wrote:
>[snip]
>>Heh heh.  I respectfully submit that you can *always* produce faster assembly
>>than any given C compiler.  It's just a matter of how much effort you are
>>willing to expend...if the compiler does a good job on 95% of the code, then
>>writing more than 5% in assembly is only for ppl like me who think it's *fun*.
>
>You are probably really, really good at it.  My days of outdoing the compiler
>stopped about 5 years ago.
>
>>I have the latest Intel compiler, and my only real gripe with it is that it
>>generates fairly large code to get that speed.  I like the aesthetic appeal of
>>small assembly code.  By writing my whole program in assembly I can make it
>>small.  Then I can go back and fix up the parts that VTune says are too slow..
>
>You are writing your *whole program* in assembly langauge then?
>I find that approach simply astonishing.
>
>How many LOC is it?
>What is the approximate playing strength?
>How many hours do you have invested in it?
>
>I shudder to think of what happens 5 years from now when everyone on the planet
>will have 64 bit chips.  It would positively make me sick thinking of it, if I
>had bothered to write the whole thing in assembly language.
>
>I remember the big shudder Lotus had when they had to translate 1-2-3 from
>assembly to C to keep up with the new generations of chips.
>
>What is the speed of your movegen?
>What is the speed of your make/unmake?
>How long to search from the starting board through 7 ply exhaustive?

Good questions and one day I will have the answers (I hope), but it's a LONG way
from being finished.  I am often guilty of that premature-optimization thing
(you know; the root of all evil?! =).  Also, I have a tendency to write and
re-write the same parts until I am satisfied with it and know the code really
well.  You're right of course that it's not portable and it takes much longer to
do things this way (i.e. results per unit of effort is much lower).

Also, I did not mean to claim that *I* can outdo the compiler in all situations!
 I can usually design the code to allow me to allocate registers better than a
compiler would (e.g. not requiring any particular parameter-passing convention).
 For example, there are no register spills inside loops in my last version of
the capture move generator.  But I have to re-write that piece soon because I
rewrote the code it uses and changed the register layout.  At least C
programmers only have to write the code once (usually)!.  Also, a decent
compiler like Intel's can usually schedule instructions better than I can.  I
may not write some parts in assembly (root-node oracle?) but my search, move and
evaluation infrastructures will be all assembly.  and SMALL.  =)

cheers,
wylie



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.