Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does Java 64 bit perform better than the 32-bit version?

I noticed Sun is providing a 64-bit version of Java. Does it perform better than the 32-bit version?

like image 214
Joshua Avatar asked Feb 26 '09 04:02

Joshua


People also ask

Should I use 32 or 64-bit Java?

Java with 64 and/or 32 bit web browsersUsers that run Applets and Web Start applications through web browsers should choose the version of Java that matches their web browser. Generally speaking, 64 bit browsers run only 64 bit plugins and 32 bit browsers run only 32 bit plugins.

Does 64-bit perform better than 32-bit?

Simply put, a 64-bit processor is more capable than a 32-bit processor because it can handle more data at once. A 64-bit processor can store more computational values, including memory addresses, which means it can access over 4 billion times the physical memory of a 32-bit processor. That's just as big as it sounds.

Is Java 64-bit better?

The 64-bit JVM is especially useful for Java applications with large heaps, such as those that use more than 100 GB of memory as a maximum. Because the size of the OOP (Ordinary Object Pointer) has increased from 32 to 64 bits, the same Java application will use more memory in the 64-bit JVM than in the 32-bit JVM.


2 Answers

Define your workload and what "perform" means to you.

This is sort of a running annoyance to me, as a performance geek of long standing. Whether or not a particular change "performs better" or not is dependent, first and foremost, on the workload, ie, what you're asking the program to do.

64 bit Java will often perform better on things with heavy computation loads. Java programs, classically, have heavy I/O loads and heavy network loads; 64 bit vs 32 bit may not matter, but operating systems usually do.

like image 42
Charlie Martin Avatar answered Sep 28 '22 05:09

Charlie Martin


Almost always 64 bits will be slower.

To quote Sun from the HotSpot FAQ:

The performance difference comparing an application running on a 64-bit platform versus a 32-bit platform on SPARC is on the order of 10-20% degradation when you move to a 64-bit VM. On AMD64 and EM64T platforms this difference ranges from 0-15% depending on the amount of pointer accessing your application performs.

There are more details at the link.

like image 104
Darron Avatar answered Sep 28 '22 05:09

Darron