Why is the 64bit JVM faster than the 32bit one?

前端 未结 5 737
灰色年华
灰色年华 2020-12-05 11:13

Recently I\'ve been doing some benchmarking of the write performance of my company\'s database product, and I\'ve found that simply switching to a 64bit JVM gives a consiste

5条回答
  •  粉色の甜心
    2020-12-05 12:08

    Without knowing your hardware I'm just taking some wild stabs

    • Your specific CPU may be using microcode to 'emulate' some x86 instructions -- most notably the x87 ISA
    • x64 uses sse math instead of x87 math, I've noticed a %10-%20 speedup of some math-heavy C++ apps in this case. Math differences could be the real killer if you're using strictfp.
    • Memory. 64 bits gives you much more address space. Maybe the GC is a little less agressive on 64 bits mode because you have extra RAM.
    • Is your OS is in 64b mode and running a 32b jvm via some wrapper utility?

提交回复
热议问题