Java JDK 32 bits vs 64 bits

前端 未结 2 1985
别那么骄傲
别那么骄傲 2021-01-18 04:07

I am creating a quite simple application which reads and display text files and search through them.

I am asking myself if there is any interest for me to propose 32

相关标签:
2条回答
  • 2021-01-18 04:21

    The only times that have swung it for me is when there have been native libraries involved that have pushed it one way or the other. If you're just in Java land then realistically, unless you need >4GB of heap size, there's very little difference.

    EDIT: The differences include things like it uses slightly more memory than 32 bit, significantly more if you're using a version before 6u23 and aren't using -XX:+UseCompressedOops. There may also be a slight performance difference between the two, but again nothing huge.

    0 讨论(0)
  • 2021-01-18 04:27

    The only differences between 32-bit and 64-bit builds of any program are the sizes of machine words, the amount of addressable memory, and the Operating System ABI in use. With Java, the language specification means that the differences in machine word size and OS ABI should not matter at all unless you're using native code as well. (Native code must be built to be the same as the word-size of the JVM that will load it; you can't mix 32-bit and 64-bit builds in the same process without very exotic coding indeed, and you shouldn't be doing that with Java about.)

    0 讨论(0)
提交回复
热议问题