aspose file tools*
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
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: 986

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: 24187
    
  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]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Compilation and Bytecode