Deegen: A JIT-Capable VM Generator for Dynamic Languages
Haoran Xu, Fredrik Kjolstad
摘要
Building a high-performance JIT-capable VM for a dynamic language has traditionally required a tremendous amount of time, money, and expertise. We present Deegen, a meta-compiler that allows users to generate a high-performance JIT-capable VM for their own language at an engineering cost similar to writing a simple interpreter. Deegen takes in the execution semantics of the bytecodes implemented as C++ functions, and automatically generates a two-tier VM execution engine with a state-of-the-art interpreter, a state-of-the-art baseline JIT, and the tier-switching logic that connects them into a self-adaptive system. We are the first to show how to automatically generate a baseline JIT compiler that rivals the current state of the art, and an interpreter that outperforms the current state of the art. Our performance comes from Deegen’s ability to automatically apply many state-of-the-art optimizations that previously had to be hand-implemented. These optimizations include bytecode specialization and quickening, register pinning, tag register optimization, call inline caching, generic inline caching, JIT polymorphic IC, JIT IC inline slab, type-check removal and strength reduction, type-based slow-path extraction and outlining, JIT hot-cold code splitting, and JIT OSR-entry. As a result, the performance of the Deegen-generated interpreter and baseline JITs matches or surpasses state-of-the-art interpreters and baseline JITs. To evaluate Deegen, we use it to implement two languages: a Lua 5.1 VM called LuaJIT Remake (LJR) and a SOM VM called DSOM. Across 44 benchmarks, LJR’s interpreter is on average 2.79× faster than the official PUC Lua interpreter, and 1.31× faster than LuaJIT’s interpreter. LJR’s baseline JIT has negligible compilation cost, and its execution performance is on average 4.60× faster than PUC Lua and only 33% slower (but faster on 13/44 benchmarks) than LuaJIT’s optimizing JIT. Across 13 benchmarks, DSOM’s interpreter is 4.28×-5.82× faster than the five existing SOM interpreters, and DSOM’s baseline JIT compiles 25.84× faster than 2SOM’s baseline JIT, while also generating code that runs 15.46× faster.
问问这篇 Paper
智能体会读完全文。
Lune 把这篇 Paper 索引到了每一个公式,引用它的顶会 Paper 也一样。你提问,回答直接引用原文。
它引用的顶会 Paper1
相关 Paper
- Partial Evaluation, Whole-Program CompilationChris Fallin, Maxwell BernsteinPLDI 2025 · 被引用 1 次
- Interpreter-guided differential JIT compiler unit testingGuillermo Polito, Stéphane Ducasse, Pablo TesonePLDI 2022 · 被引用 9 次
- Deoptless: speculation with dispatched on-stack replacement and specialized continuationsOlivier Flückiger, Jan Jecmen, Sebastián Krynski, Jan VitekPLDI 2022 · 被引用 5 次
- JavART: A Lightweight Rule-Based JIT Compiler using Translation Rules Extracted from a Learning ApproachHanzhang Wang, Wei Peng, Wenwen Wang, Yunping Lu 等OOPSLA 2025
- Compiling Parallel Symbolic Execution with ContinuationsGuannan Wei, Songlin Jia, Ruiqi Gao, Haotian Deng 等ICSE 2023 · 被引用 10 次
