64位jvm和32位jvm性能

原文引自于:
http://www.oracle.com/technetwork/java/hotspotfaq-138619.html#64bit_description

一般来说,64位jvm相比32位jvm能够处理更大的内存,但伴随而来的一个小的性能损失。
这是因为系统中的每个本地指针在64位jvm上都占用8个字节而不是4个。加载这些额外的数
据会影响内存使用量,这会导致执行速度稍慢,具体取决于程序执行期间加载的指针数量
。好消息是,在AMD64和EM64T平台下,Java VM获得了一些额外的寄存器,可用于生成更
高效的本机指令序列。这些额外的寄存器提高了性能,使得在比较32位到64位执行速度时通
常没有性能损失。

在SPARC上,当您移至64位虚拟机时,相比32位平台,其性能差异会降低10-20%。
在AMD64和EM64T平台上,根据应用程序指针数量的不同,这个差异范围为0-15%。

What are the performance characteristics of 64-bit versus 32-bit VMs?

Generally, the benefits of being able to address larger amounts of memory come with a small performance loss in 64-bit VMs versus running the same application on a 32-bit VM. This is due to the fact that every native pointer in the system takes up 8 bytes instead of 4. The loading of this extra data has an impact on memory usage which translates to slightly slower execution depending on how many pointers get loaded during the execution of your Java program. The good news is that with AMD64 and EM64T platforms running in 64-bit mode, the Java VM gets some additional registers which it can use to generate more efficient native instruction sequences. These extra registers increase performance to the point where there is often no performance loss at all when comparing 32 to 64-bit execution speed.
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.

文章为作者原创文章,如果对您有帮助,欢迎打赏!这里写图片描述这里写图片描述