Compiled For 32-bit v 64-bit?

Discussion of chess software programming and technical issues.

Moderators: hgm, Dann Corbit, Harvey Williamson

bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: Compiled For 32-bit v 64-bit?

Post by bob »

towforce wrote:
Don wrote:If the program you are compiling at work is not chess it probably doesn't matter too much. Does is specifically take advantage of 64 bit instructions? In particular does it do a lot of bit manipulation with 64 bit variables?
Probably not. The general web application would not be doing intense repetitive operations like a chess program.

The MIP (mixed integer programming) part I am adding uses double arithmetic, and it's possible that some 64-bit manipulation would be used if I were to use the x64 version of the optimiser DLL (which in this case would be the same code compiled for 64-bits rather than 32-bits) - but for the moment I don't really have a choice but to use the 32-bit DLL.
This is a double-edged sword.

1. 64 bit mode makes pointers and addresses longer. Which can slow down things a bit.

2. 64 bit mode brings 8 new integer registers (r8-r15) which gives the compiler a chance to do better optimizations.

Yes, bitboard programs should always be compiled in 64 bit mode since they use 64 bit values all over the place. But non-bitboard programs will likely be helped by the extra registers, so long as they don't get killed by the longer pointers..