• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Diffrence between code complied on 32, 64 bit JDK?

 
anna anhc
Greenhorn
Posts: 1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Just wanted to know if there will be any difference in terms of performance between code complied on 32, 64 bit JDK, while running on 32, 64 bit JDK?

Therotically there should not be any difference , but the .class files are in binary format and are created using specific jdk's. Thus there might be difference according to which JDK is used for compiling them.

Is there any documentation from sun/ oracle which confirms that there is no difference/ there is a difference?





 
Pramod P Deore
Ranch Hand
Posts: 632
Android Eclipse IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The space an object takes in the heap in 64-bit mode is 39.3% larger on average than in 32-bit mode. You may find more information here
 
Henry Wong
author
Marshal
Pie
Posts: 20836
75
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
anna anhc wrote:
Therotically there should not be any difference , but the .class files are in binary format and are created using specific jdk's. Thus there might be difference according to which JDK is used for compiling them.


There are *no* class files differences between code compiled with the 32 bit and 64 bit versions of the same revision of Java. The class files should be the same.

Henry
 
Campbell Ritchie
Sheriff
Pie
Posts: 47293
52
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Pramod P Deore wrote: . . . You may find more information here
They used Jikes and an IBM JVM for jdk1.4; things might have changed since then, and the Sun JVM might behave differently.
 
Henry Wong
author
Marshal
Pie
Posts: 20836
75
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Pramod P Deore wrote:The space an object takes in the heap in 64-bit mode is 39.3% larger on average than in 32-bit mode.


Having "ported" a lot of applications from a 32 bit environment to a 64 bit environment, I can say that I have never seen an increase of the memory footprint, average or otherwise, as large as 40 percent. Larger? yes. Forty percent larger? no.

Henry
 
Jayavardhan geepi
Ranch Hand
Posts: 66
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can some one please explain the difference between 32 bit jdk and 64 bit jdk?

Jay
 
Anayonkar Shivalkar
Bartender
Posts: 1557
5
Eclipse IDE Java Linux
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jayavardhan geepi wrote:Can some one please explain the difference between 32 bit jdk and 64 bit jdk?

Jay

Well, 32 bit jdk is meant to run on 32 bit platform, whereas 64 bit jdk is meant to run on 64 bit platform. However, class file is exactly same, not matter on which type of Oracle jdk it is compiled (i.e. class file created by 32 bit jdk on Windows is same as that created by 64 bit jdk on Linux)

I hope this helps.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic