32-bit and 64-bit java engines

Discussion of anything and everything relating to chess playing software and machines.

Moderators: hgm, Rebel, chrisw

User avatar
Sylwy
Posts: 4467
Joined: Fri Apr 21, 2006 4:19 pm
Location: IASI - the historical capital of MOLDOVA
Full name: SilvianR

Re: YES !

Post by Sylwy »

SzG wrote:Am I right assuming that a java engine run under 32-bit java environment is a 32-bit engine, while the same engine under 64-bit java environment is a 64-bit engine?
That is, the two engies are different, the '64-bit' one expected to be stronger?
Hi Gabor !

A 64-bit Java chess engine can run on a 32-bit Java environment without any problem. Of course, the performances are for 32-bit. See, please, Fischerle 0.9.30b (and others).

Best to you !
SilvianR :wink:
User avatar
RolandoFurioso
Posts: 55
Joined: Sat Feb 22, 2014 7:29 pm
Location: Frankfurt

Re: YES !

Post by RolandoFurioso »

Sylwy wrote: Hi Gabor !

A 64-bit Java chess engine can run on a 32-bit Java environment without any problem. Of course, the performances are for 32-bit. See, please, Fischerle 0.9.30b (and others).

Best to you !
SilvianR :wink:
Regarding Fischerle, there is another subtle but important point why the current version is labeled "64 bit". Although the jar file surely runs as well on 32 bit systems, the number of hash table entries to be allocated (given the amount of hash table memory to be made available in MB) is calculated by taking into account the memory footprints of the java objects and object references that make up the hash table structures. Specifically, on 64 bit systems, each object reference uses up 8 bytes of memory, while on 32 bit architectures, 4 byte will typically be used.

This implies that, on 32 bit architectures, Fischerle coud allocate more hashtable entries than on 64 bit systems. The current version, however, allocates HT sizes by presupposing a 64 bit architecture, as the internal memory size calculation is hardwired. Hence, if the the current version Fischerle 0.9.30b is run on 32 bit systems, you will get a slightly underperforming instance of Fischerle as the available amount of hash table space won't be completely utilized.

I plan to address this point in a future version of Fischere - probably by implementing an additional parameter that allows to specify the architecture (distinguishing between 64 amd 32 bit) on which Fischerle shall run. Strictly speaking, one should further take into account the particular Java implementation (Linux vs. Win32 vs. Win64 vs Mac, etc.), as the memory footprint might not just depend on the 64 vs. 32 bit question. Technically, this amounts to performing extensive analysis with a tool such as the NetBeans profiler, which I used for determining the HT memory footprint on Win64.

Roland
User avatar
Sylwy
Posts: 4467
Joined: Fri Apr 21, 2006 4:19 pm
Location: IASI - the historical capital of MOLDOVA
Full name: SilvianR

Re: YES !

Post by Sylwy »

RolandoFurioso wrote:
Sylwy wrote: Hi Gabor !

A 64-bit Java chess engine can run on a 32-bit Java environment without any problem. Of course, the performances are for 32-bit. See, please, Fischerle 0.9.30b (and others).

Best to you !
SilvianR :wink:
Regarding Fischerle, there is another subtle but important point why the current version is labeled "64 bit". Although the jar file surely runs as well on 32 bit systems, the number of hash table entries to be allocated (given the amount of hash table memory to be made available in MB) is calculated by taking into account the memory footprints of the java objects and object references that make up the hash table structures. Specifically, on 64 bit systems, each object reference uses up 8 bytes of memory, while on 32 bit architectures, 4 byte will typically be used.

This implies that, on 32 bit architectures, Fischerle coud allocate more hashtable entries than on 64 bit systems. The current version, however, allocates HT sizes by presupposing a 64 bit architecture, as the internal memory size calculation is hardwired. Hence, if the the current version Fischerle 0.9.30b is run on 32 bit systems, you will get a slightly underperforming instance of Fischerle as the available amount of hash table space won't be completely utilized.

I plan to address this point in a future version of Fischere - probably by implementing an additional parameter that allows to specify the architecture (distinguishing between 64 amd 32 bit) on which Fischerle shall run. Strictly speaking, one should further take into account the particular Java implementation (Linux vs. Win32 vs. Win64 vs Mac, etc.), as the memory footprint might not just depend on the 64 vs. 32 bit question. Technically, this amounts to performing extensive analysis with a tool such as the NetBeans profiler, which I used for determining the HT memory footprint on Win64.

Roland
Hello Maestro Roland !

THANK YOU a lot for your interesting and complete Java chess engines !
THANK YOU for the above clarifications !

Take a look here, please, to my JAVA GRAND FINAL 2014 :

http://talkchess.com/forum/viewtopic.ph ... 48&t=51043

In the evening will be a new cross-table !

Regards,
SilvianR :wink:
User avatar
RolandoFurioso
Posts: 55
Joined: Sat Feb 22, 2014 7:29 pm
Location: Frankfurt

Re: YES !

Post by RolandoFurioso »

Sylwy wrote:
RolandoFurioso wrote:
Sylwy wrote: Hi Gabor !

A 64-bit Java chess engine can run on a 32-bit Java environment without any problem. Of course, the performances are for 32-bit. See, please, Fischerle 0.9.30b (and others).

Best to you !
SilvianR :wink:
Regarding Fischerle, there is another subtle but important point why the current version is labeled "64 bit". Although the jar file surely runs as well on 32 bit systems, the number of hash table entries to be allocated (given the amount of hash table memory to be made available in MB) is calculated by taking into account the memory footprints of the java objects and object references that make up the hash table structures. Specifically, on 64 bit systems, each object reference uses up 8 bytes of memory, while on 32 bit architectures, 4 byte will typically be used.

This implies that, on 32 bit architectures, Fischerle coud allocate more hashtable entries than on 64 bit systems. The current version, however, allocates HT sizes by presupposing a 64 bit architecture, as the internal memory size calculation is hardwired. Hence, if the the current version Fischerle 0.9.30b is run on 32 bit systems, you will get a slightly underperforming instance of Fischerle as the available amount of hash table space won't be completely utilized.

I plan to address this point in a future version of Fischere - probably by implementing an additional parameter that allows to specify the architecture (distinguishing between 64 amd 32 bit) on which Fischerle shall run. Strictly speaking, one should further take into account the particular Java implementation (Linux vs. Win32 vs. Win64 vs Mac, etc.), as the memory footprint might not just depend on the 64 vs. 32 bit question. Technically, this amounts to performing extensive analysis with a tool such as the NetBeans profiler, which I used for determining the HT memory footprint on Win64.

Roland
Hello Maestro Roland !

THANK YOU a lot for your interesting and complete Java chess engines !
THANK YOU for the above clarifications !

Take a look here, please, to my JAVA GRAND FINAL 2014 :

http://talkchess.com/forum/viewtopic.ph ... 48&t=51043

In the evening will be a new cross-table !

Regards,
SilvianR :wink:
Hi Silvian,

thank *you* for having generated so much attention about Fischerle!

I had already seen your ongoing JAVA GRAND FINAL 2014 and that Fischerle is participating at this very interesting tournament. Let's see which place Fischerle will be finishing at!

All the best,
Roland
User avatar
RolandoFurioso
Posts: 55
Joined: Sat Feb 22, 2014 7:29 pm
Location: Frankfurt

Re: YES !

Post by RolandoFurioso »

SzG wrote:
Hello Roland,

You mention 32-bit and 64-bit architectures, not Java versions, which makes me feel a bit insecure, so please clarify the situation further by answering this question:
On 64-bit hardware and 64-bit operating system is there a difference for a Java engine between 32-bit and 64-bit Java runtime environment?
Hi Gabor,

good question! I'd say yes, though I didn't try it yet; I think that object references will use up 8 bytes / 64 bit anyway even if you emulate a 32 bit JRE on a 64 bit OS / hardware.

I have not yet considered this possibility as one would give up the huge efficiency advantage of a 64 bit environment for the bitboard-based architecture of Fischerle, which would not make much sense although the hash table could be somewhat larger.

Roland