Partial Evaluation, Whole-Program Compilation
Chris Fallin, Maxwell Bernstein

TL;DR
This paper introduces a partial evaluator that automatically derives optimized compiled code from an interpreter, simplifying the compilation process and improving runtime performance in dynamic language engines.
Contribution
The work presents a novel partial evaluation technique that generates efficient compiled code directly from interpreters, reducing complexity and maintaining correctness.
Findings
Achieved 2.17x speedup on SpiderMonkey JavaScript engine
Achieved 1.84x speedup on PUC-Rio Lua interpreter
Requires only three hours of effort to implement
Abstract
There is a tension in dynamic language runtime design between speed and correctness: state-of-the-art JIT compilation, the result of enormous industrial investment and significant research, achieves heroic speedups at the cost of complexity that can result in serious correctness bugs. Much of this complexity comes from the existence of multiple tiers and the need to maintain correspondence between these separate definitions of the language's semantics; also, from the indirect nature of the semantics implicitly encoded in a compiler backend. One way to address this complexity is to automatically derive, as much as possible, the compiled code from a single source-of-truth; for example, the interpreter tier. In this work, we introduce a partial evaluator that can derive compiled code ``for free'' by specializing an interpreter with its bytecode. This transform operates on the interpreter…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsLogic, programming, and type systems · Security and Verification in Computing · Software Testing and Debugging Techniques
