Author: Daniel Clausen
Date: 11:56:53 12/13/99
Go up one level in this thread
Hi
On December 13, 1999 at 01:34:51, Richard A. Fowell (fowell@netcom.com) wrote:
>When people compare computer program speeds across processors, the ratio
>is definitely a function of the program and the compiler. In my HIARCS 7.0
>benchmarks, it seems that the HIARCS 7.0 gained more relative benefit from
>the Mac vs. the PII, about 46%. But it is definitely a function of the
>chess software. I don't have any G4 numbers for HIARCS, but I would not
>expect much difference between a G4 and a G3 for HIARCS - it wasn't
>compiled for Altivec, and even if it were, the Altivec instructions
>are mainly aimed at helping operations hardly ever used by chess, although
>one chess programmer has told me there are some Altivec features that might
>be useful to chess software.
I also think that G4's Altivec for the current chess programs wouldn't help
a lot. But one of the reasons is that current chess programs don't code in a
way that Altivec could be useful. If Altivec would be part of every CPU for
10 years, that most prolly would be different.
Some months ago I posted a code-snippet where Altivec would be of BIG
help. I can't find this posting at the moment, since I don't even know the
exact month I posted it. But the code snippet was approx the following:
#define And64(a, b) ((a) & (b))
#define ShiftL64(a, b) ((a) << (b))
#define TstBit64(a, b) (!!And64((a), ShiftL64((BitBoard)1, (b))))
char values[64];
BitBoard bitMask; // sizeof(long long) = 64
int i, sum = 0;
for(i=0; i<64; i++)
{
if(TstBit64(bitMask, i))
sum += values[i];
}
So basically it calculates the sum of all entries in the values[] array,
if the corresponding bit in the bitMask is set. Altivec has a very good
support for this kind of things. Calculating piece-square-table values
is one example, where this would be very useful.
Kind regards,
-sargon
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.