Aviral Goel

Posts tagged with ‘Speculative Optimization’ (1)

Correctness of Speculative Optimizations with Dynamic Deoptimization

High-performance dynamic language implementations make heavy use of speculative optimizations to achieve speeds close to statically compiled languages. These optimizations are typically performed by a just-in-time compiler that generates code under a set of assumptions about the state of the program and its environment. In certain cases, a program may execute code compiled under assumptions that are no longer valid. The implementation must then deoptimize the program on-the-!y; this entails “nding semantically equivalent code that does not rely on invalid assumptions, translating program state to that expected by the target code, and transferring control.