• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

64 bit jdk improves performance?

 
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
1) I wanted to know if 64 bit jdk improves the performance. ? Since pointers storage change from 32 bit to 64 bit and requires more memory I am wondering how is it going to improve the performance

2) Also is it easy to migrate the application developed in 32 bit to 64 bit ?

 
author
Posts: 23928
142
jQuery Eclipse IDE Firefox Browser VI Editor C++ Chrome Java Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Kowshik Nandagudi wrote:1) I wanted to know if 64 bit jdk improves the performance. ? Since pointers storage change from 32 bit to 64 bit and requires more memory I am wondering how is it going to improve the performance




Well, 64 bit JVMs are bigger than 32 bit JVMs -- both in executable size and the amount of memory that it uses at time run time. And I noticed that it takes slightly slower to start (anecdotal), so yeah, there may be some cases where it's not optimal.

However, remember that 64bit JVMs run on 64bit machines -- with 64bit memory buses, 64bit registers, 64bit ALUs, etc. This means that pointer processing is just as fast as its 32bit counterpart. And when it comes to data processing, it can process longs and doubles without doing it in 32bit pieces, it can do memory copies / moves at twice the speed, and of course, 64bit processors are just faster processors (and generally in machines with better hard drives, maybe better networks, more memory, etc.).

Henry
 
Henry Wong
author
Posts: 23928
142
jQuery Eclipse IDE Firefox Browser VI Editor C++ Chrome Java Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Kowshik Nandagudi wrote:
2) Also is it easy to migrate the application developed in 32 bit to 64 bit ?



There should be no migration needed. The 32bit JVM and 64bit JVM will run the same class files. All the conversion to 32bit instructions versus 64bit is done at run time by the JIT compiler.

Henry
 
Ranch Hand
Posts: 245
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Some 64-bit JVMs can compress pointers into 32 bits to save memory.
 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I presume, we can not run 64 bit compiled code in 32 bit JVM. correct me If I am wrong
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Java bytecode is independent of 32-bit or 64-bit. Java bytecode runs on any JVM, doesn't matter if the JVM is 32-bit or 64-bit.

The Java compiler from a 32-bit JDK produces exactly the same bytecode as the Java compiler from a 64-bit JDK. You do not need (it isn't even possible) to compile your Java code for 32-bit or 64-bit.

Whether a 64-bit JDK runs programs faster depends a lot on the program, the computer it's running on, specific settings and many other factors. I've written a computation-intensive program, which runs much faster on a 64-bit JDK than on a 32-bit JDK on 64-bit Windows 7. But a single example is not definitive proof that programs are always faster on a 64-bit JVM.

One of the major advantages of 64-bit is that the JVM can allocate more than 4 GB memory, which is useful for software that needs a lot of memory, for example running on a big server.
 
Rancher
Posts: 3742
16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Jesper de Jong wrote:Whether a 64-bit JDK runs programs faster depends a lot on the program, the computer it's running on, specific settings and many other factors. I've written a computation-intensive program, which runs much faster on a 64-bit JDK than on a 32-bit JDK on 64-bit Windows 7.


Should all those JDKs be JRE/JVMs ?
 
Jesper de Jong
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes...
 
permaculture is giving a gift to your future self. After reading this tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic