| |
| | Java theory and practice: Dynamic compilation and performance measurement |
 | | Only compiling code that is executed frequently has several performance advantages: No time is wasted compiling code that will execute infrequently, and the compiler can, therefore, spend more time on optimization of hot code paths because it knows that the time will be well spent. |
 | | It can perform many of the standard optimizations found in static compilers, such as code hoisting, common subexpression elimination, loop unrolling, range check elimination, dead-code elimination, and data-flow analysis, as well as a variety of optimizations that are not practical in statically compiled languages, such as aggressive inlining of virtual method invocations. |
 | | If the compiler is going to optimize away a block of code because it reasons the code to be irrelevant (a common situation with benchmarks that don't actually do anything), you can see it in the generated machine code -- the code is not there. |
| www-128.ibm.com /developerworks/java/library/j-jtp12214?ca=degr-L0260dyncompilation (3542 words) |
|