[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gnuchess bugs & java
From: |
Xan Gregg |
Subject: |
Re: gnuchess bugs & java |
Date: |
Thu, 2 Jun 2005 18:22:45 -0400 |
[resending -- my first response didn't cc the list]
Thanks for the quick response, Mridul.
Try with -server option , and if possible try with 1.5 heard it has a
bit faster hotspot , better mem management , etc.
But half the speed is quiet good I must say ! since it has no "java"
optimizations yet :)
I tried 1.5 last night and the times got worse. This is still on the
Mac, where 1.5 is new... I need to try an Sun JRE. I even tried
converting the leadz calls to 1.5's Long.numberOfLeadingZeros()
hoping it would use the PowerPC's built-in cntlzd instruction, but
the times got worse still. I forgot about the -server flag -- will
try it.
The 64 bit int's used are all unsigned in gnuchess ... java does not
have a concept of unsigned long (actually , no concept of unsigned
itself).
So it is going to be interesting of how you plan to use it through
java.
Book , hashing , etc will all be affected.
It hasn't been as big a problem as I expected -- I mainly just had to
convert all the right shift operators to uses Java's unsigned right
shift, '>>>'. A few places needed things like '& 0xff' to avoid sign
extension. BTW, Java does have one unsigned primitive: char.
The trick you see above is called zorbist hashing - more info here ...
Thanks for the pointers!
BTW, any way someone can get rid of all the spam on this list?
I just rely on more agressive gmail filters ...
Actually, I was more concerned with: can the spam be kept off of the
web archive?
xan