Friday, February 13, 2026

Java OSR

Compilation in java is fine asynchronously. Java code will continue to be executed via interpretation while the compilation is queued to compile. Once compilation is done, the compile code will replace the Java’s code o. The stack so that the next execution of the code path will use the compiled code instead. This is called on stack replacement. For example, if the code to be compiled is a loop that keep on running. You cannot wait to replace the java  code by compiled code until the loop execution ends which may never happened. OSR enable the compiled code to run as soon as the compilation is done. 

No comments: