Java and Just-in-time Compiler
l “Portable” languages e.g., Java
• Does not compile directly to CPU native code
• Interpretive execution of common bytecodes on
JVMs (Java VM)
• Speed problem (1/10 〜 1/100 vs. optim. native code)
l Just-In-Time compiler to the rescue
• Rather old idea: Smalltalk, etc.
• Compile bytecode into native code at runtime
• 1/2 〜 1/10 vs. optim. native code
l Sun, MS, IBM, Symantec, Fujitsu, etc.,
vigorously developing “the best” Java JIT. (e.g.,
HotSpot)