Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Portability and Readability and compilers are most important in software

Author: Sune Fischer

Date: 17:29:24 10/23/03

Go up one level in this thread


>
>What i also do avoid in diep is writing out code for black and white. I have
>neat loops there where easily possible:
>  for( side = 0 ; side <= 2; side++ )

Pawns always break symmetry anyway, so it doesn't work 100%.

>I sure can win a few % there.
>
>Another thing i avoid is mixing 8 bits with 32 bits code. I really try to avoid
>mixing different types whereever possible.
>
>Only for node counts i have 64 bits variables, simply because 32 isn't enough
>there.
>
>>I view portability and readability as more important than the few percent
>>performance I could get from writing some parts in ASM.
>
>Again i agree completely. A very good example is that in so many patterns in my
>evaluation i can speed diep a very little bit up by doing next:
>
>Current code:
>  if( board[sq_xx] == piece && color[sq_xx] == xside ....
>
>Trivially i can rewrite this ugly by writing out black & white.
>
>Another way to speed this up in what i think is ugly:
>
>  if( !((board[sq_xx]-piece)|(color[sq_xx]-xside)) ....
>
>All together i'm sure i can get diep like that 20% faster with all those dirty
>tricks (assembly even more perhaps), especially the 8 bits code would rock at
>the K7 (and do poor at the opteron).

Why don't you just access it through a macro, then you quickly test the speed of
different expressions?

I guess you don't like macros either? :)

-S.



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.