How to run 32-bit Java on Mac OSX 10.7 Lion

前端 未结 5 2171
别那么骄傲
别那么骄傲 2020-12-02 14:34

From my experience with Windows 7 (64-bit) and Java, a 32-bit JRE uses less memory and runs significantly faster than a 64-bit JRE (provided you don\'t need or benefit from

5条回答
  •  旧时难觅i
    2020-12-02 15:17

    The latest versions of Java 64-bit have -XX:+UseCompressedOops on by default (if your heap is less than 32 GB). This means 32-bit references are used in any case. The objects are still slightly bigger (4 bytes more overhead)

    This article compares 32-bit, 64-bit with UseCompressedOops Java: How much memory do different arrays and collections consume

    In terms of performance, I have found it to be 5-10% depending on what you are doing. If you are using a lot of long values it will be faster to use 64-bit.

提交回复
热议问题