Author: William Bryant
Date: 07:04:28 06/19/04
Go up one level in this thread
On June 18, 2004 at 12:35:44, Anthony Cozzie wrote:
>On June 18, 2004 at 04:26:48, Joshua Shriver wrote:
>
>>A friend of mine has a G5 and he ran crafty 19.12's Bench for me a while back.
>>I have a dual G4 533mhz and I get around 400-420k nps..
>>
>>His single G5 get's around 1.5million nps..
>>can you imagine a cluster of these badboys hehe :) and his was a first
>>generation G5... can't imagine once the 3ghz comes out, and that's with crafty's
>>basic code... not 64bit or PPC asm cores...
>
>Crafty does not have an ASM core per say, only a few routines are optimized (for
>example, BSF/BSR). C compilers today are good enough that assembly will not
>give you much anyway, unless maybe your name is Frans Morsch.
>
>anthony
>
>>If there was asm cores in crafty for PPC as their are in Opteron, x86 I'd be
>>even more amazed... this is just strictly C (c++ for egtb) code using pthread
>>and MUTEX and I hear MUTEX is slower.
>>
>>Sincerely,
>>Joshua Shiver
>>
>>
>>
>>>
>>>Agree, I would love to see what numbers crafty gets on the new liquid cooled 2.5
>>>Ghz G5 PowerMac:
>>>
>>>http://www.apple.com/powermac/
>>>
>>>regards
>>>Andy
The G5 has two distince _advantages_ that need to be exploited to get maximum
performance on a G5.
One, compile crafty for 64 bit integers to use bitboards efficiently.
Two, the PPC has specific intstructions to do bit counting, which is what most
of the optomized assembly code tries to do if I remember correctly.
the cntlzw function counts the number of zero bits starting a the ?low order?
end of the register.
This is used for firstOne and lastOne and the other functions.
I have Codewarrior versions of the routines posted below.
I wonder how durable the liquid coolling system is.
Apple does good engineering, but I would definately spend a few extra $$ on the
extended apple warrienty. I have used it several times with my aging laptop and
found them fast, efficient and friendly.
(I have replaced the LCD screen on my lap top for $0 and it took 3 days door to
door.
The Code:
Note: __cntlzw is is a CodeWarrior macro for the assembly language instruction
inline UInt32 FirstOne(register BitBoard a) {
register UInt32 i;
if (i = a >> 32)
return(__cntlzw(i));
if (i = (UInt32) a)
return(__cntlzw(i) + 32);
return(64);
}
inline unsigned long LastOne(register BitBoard a) {
register UInt32 i;
if (i = (UInt32) a)
return(__cntlzw(i ^ (i - 1)) + 32);
if (i = a >> 32)
return(__cntlzw(i ^ (i - 1)));
return(64);
}
inline UInt32 NextOne(register BitBoard& a) {
register UInt32 i;
register UInt32 value;
if (i = a >> 32) {
value = __cntlzw(i);
a^=SquareMask[value];
return value;
}
if (i = (UInt32) a) {
value = __cntlzw(i) + 32;
a^=SquareMask[value];
return value;
}
return(64);
}
inline UInt32 PopCnt(register BitBoard a) {
register UInt32 c=0;
while(a) {
c++;
a &= a - 1;
}
return(c);
}
William
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.