🔥 Burn Fat Fast. Discover How! 💪

Tiered Compilation in JVM #compilation #jvm #jit Before Java 7 | Java Tech News

Tiered Compilation in JVM
#compilation #jvm #jit
Before Java 7 you had to choose between to JIT compilers: C1 and C2. C1 (client compiler) was optimized for faster start-up time and C2 (server compiler) was optimized for better overall performance. The Tiered Compilation feature changes the premise by allowing JIT to have multiple compilations at runtime based on the profiling metrics.

An additional benefit of tiered compilation is more accurate profiling information. Before tiered compilation, the JVM collected profiling information only during interpretation. With tiered compilation enabled, the JVM also collects profiling information on the C1 compiled code.

Even though C2 compiled code is highly optimized, it can be deoptimized. As a result, the JVM would temporarily roll back to bytecode from the code cache. Deoptimization happens when the compiler’s optimistic assumptions are proven wrong.
https://www.baeldung.com/jvm-tiered-compilation