Toga and 64 bit(and a few other questions)

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

Gerd Isenberg
Posts: 2250
Joined: Wed Mar 08, 2006 8:47 pm
Location: Hattingen, Germany

Re: Toga and 64 bit(and a few other questions)

Post by Gerd Isenberg »

ed wrote: That's pretty disappointing with all those extra registers.
There are some quarrels from 64-bit mode. Pointer are 64-bit and need more space/bandwidth if stored in memory, signed 32-bit indices need to be 64-bit sign-extended, using extra registers imply rex prefixes, aka longer opcode. Accessing global variables requiere additional register and lea instruction to load a base register. Additionally the ABI-requirements with caller safe registers and alignment issues with a stack frame, using a lot of moves relative to rbp instead of much shorter opcodes of push/pop. Some implicite calls to handle page issues, if you need >= pagesize/2 locals on the stack per procedure, etc.. Probably less agressive inter procedure optimization and what ever else. We really miss a "compact" 64-bit mode with 32-bit addresses.

Seems non-bitboard programs with already low or moderate register pressure and fastcall convention in 32-bit mode don't profit that much or at all from 64-bit mode.

Gerd
Bryan Hofmann

Re: Toga and 64 bit(and a few other questions)

Post by Bryan Hofmann »

ed wrote:
Bryan Hofmann wrote:
revengeska wrote:A few questions about Toga:

2. How well does Toga take advantage of 64 bit? Anyone run any tests? Toga uses bitboards if I remember right, and so the speedup should be notable, but the lack of a 64 bit Toga in tournaments/rating lists has me wondering.


Thanks.
Compiling Toga for 64 bit is certainly possible and I have done so many times for Windows and placed them on my site. The problem is that after countless hours of fiddling with the code and compile options you see less then a 5% speed up. This speed up means nothing in terms in increased strength.

Bryan
That's pretty disappointing with all those extra registers. Did you try the Intel 64-bits compiler as well?

Ed
Yes with the same results and a bit slower then the MSVC 64bit compiles.

Bryan