This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum 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
Register / Login


JavaRanch » Java Forums » Java » Beginning Java
Reply 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: 24081
    
  15


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://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Compilation and Bytecode
 
Similar Threads
Prevent from hacker
Is Andriod JAVA different?
converting back class file to Java file??
including source in JAR
What happens to the bytecode