tags:

views:

159

answers:

3

Hi, Do I have the 64 bit of JDK installed on my machine? My java -version says: C:\Documents and Settings\Administrator>java -version

java version "1.6.0_20"
Java(TM) SE Runtime Environment (build 1.6.0_20-b02)
Java HotSpot(TM) 64-Bit Server VM (build 16.3-b01, mixed mode)

Should I expect a performance improvement in using a 64 bit compiler versus a 32 bit one? Thanks, Mike

+2  A: 

Yes, it says Java Hotspot(TM) 64-bit. In regards to 64-bit vs. 32-bit JVM performance the main benefit of a 64-bit JVM is the larger address space. See the Hotspot FAQ.

The primary advantage of running Java in a 64-bit environment is the larger address space. This allows for a much larger Java heap size and an increased maximum number of Java Threads, which is needed for certain kinds of large or long-running applications. The primary complication in doing such a port is that the sizes of some native data types are changed. Not surprisingly the size of pointers is increased to 64 bits. On Solaris and most Unix platforms, the size of the C language long is also increased to 64 bits. Any native code in the 32-bit SDK implementation that relied on the old sizes of these data types is likely to require updating.

Taylor Leese
And what about the performance issue?
Yaneeve
+2  A: 

I would not expect any great performance improvement with a 64-bit compiler, no.

JesperE
+1  A: 

The compiler, won't make a difference once you get to run-time. Java compiles to a bytecode, and the output is independent of the architecture used to run the compiler.

You may see different compilation times between a 32-bit compiler and a 64-bit compiler, just like you may see different run times between 32-bit and 64-bit runtimes (but runtimes go under the JRE, not JDK). This depends on how well they have been optimized for that architecture (x86/x64), but one does not affect the other (a slow compilation doesn't have to mean the execution will be slow, or vice versa).

(Of course, this assumes that the two compilers only differ in bitness, and that they aren't applying different sets of optimizations or otherwise do some things slightly differently.)

Michael Madsen