
292 An Introduction to Compiler Construction in a Java World
to machine code at once to run. In Section 8.2 we saw that things work differently in Java’s
HotSpot JIT compiler. The HotSpot compiler may not JIT compile a method if it expects
the overhead of compilation to be lower than the overhead of interpreting the code. It
can recompile with heavier optimization than before, based on actual usage. In that sense,
CLR’s JIT compilation is simpler than HotSpot compilation.
At the end, one may ask how the Java platform compares to .NET Framework. The
answer to that, in a nutshell, is that Java platform deals with one language running on
multiple operating ...