Understanding the Tricks Behind the JIT

To many developers, compilers are mysterious — and the just-in-time compilers in a modern runtime simply seem to be black magic. However, there are really only a few simple concepts that guide any compiler and once you understand them you can make the compiler work for you.

In this talk, we’ll go through a seemingly simple piece of Java code in detail examining the many techniques that OpenJDK uses to make that piece of code run fast including static optimizations, speculative profiled based optimizations, and how those optimizations tie into the real black magic of the JVM deoptimization.