This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Compilation and Bytecode Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Compilation and Bytecode" Watch "Compilation and Bytecode" New topic
Author

Compilation and Bytecode

Philip Pomario
Ranch Hand

Joined: Oct 03, 2003
Posts: 113
Is there any performance difference on the bytecode generated using the same source on different compilers? Are the comments on the source added into the compiled file? Thanks.
William Barnes
Ranch Hand

Joined: Mar 16, 2001
Posts: 984

Not sure about the first question. But no, the comments would not be found in byte code.


Please ignore post, I have no idea what I am talking about.
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24183
    
  34


Is there any performance difference on the bytecode generated using the same source on different compilers?

No, not really. In most JVMs, bytecode is further translated into machine code by a JIT or the HoptSpot engine (in Sun's JVMs.) These machine-code translators do further optimization, so the best performance generally comes from the most "typical" code. Most byte-compilers simply try to emit plain, ordinary code which is similar to what javac produces, to make the work of the JIT or HotSpot compiler easier.


[Jess in Action][AskingGoodQuestions]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Compilation and Bytecode
 
Similar Threads
converting back class file to Java file??
Is Andriod JAVA different?
What happens to the bytecode
Prevent from hacker
including source in JAR