by
Yusuke Izawa, Carl Friedrich Bolz-Tereick, Nico Rittinghaus and
Hidehiko MasuharaAbstract:
The RPython framework's meta-tracing JIT compiler uses a single generic tracer for all interpreters written in the RPython language, but this genericity causes overhead: the tracer dispatches every operation through an opcode lookup and performs redundant bookkeeping even for pure operations. We propose GenExtension, which specializes the tracer to a given interpreter at translation time, eliminating dynamic dispatch and skipping recording and heap-cache invalidation for pure operations. We implemented a prototype in RPython and applied it to the PyPy interpreter. On 28 benchmarks from the PyPy benchmark suite, GenExtension reduces tracing time by 11% (geometric mean) and resume data generation (the metadata needed to deoptimize back to the interpreter) by 28%, while producing nearly equivalent machine code and leaving total execution time unchanged (0.99x). Extending the specialization to more operation classes to reduce total execution time is future work.
Reference:
Generating Interpreter-Specific Tracers for Meta-Tracing JIT Compilers (Yusuke Izawa, Carl Friedrich Bolz-Tereick, Nico Rittinghaus and Hidehiko Masuhara), In Proceedings of the 23rd International Conference on Managed Programming Languages and Runtimes (MPLR 2026) (Stéphane Ducasse, Christophe Scholliers, eds.), 2026.
Bibtex Entry:
@inproceedings{izawa2026mplr,
author = {Yusuke Izawa and {Carl Friedrich} Bolz-Tereick and Nico Rittinghaus and Hidehiko Masuhara},
title = {Generating Interpreter-Specific Tracers for Meta-Tracing {JIT} Compilers},
booktitle = {Proceedings of the 23rd International Conference on Managed Programming Languages and Runtimes (MPLR 2026)},
year = 2026,
editor = {St\'ephane Ducasse and Christophe Scholliers},
month = jun,
date = {2026-06-30},
abstract = {The RPython framework's meta-tracing JIT compiler uses a single generic tracer for all interpreters written in the RPython language, but this genericity causes overhead: the tracer dispatches every operation through an opcode lookup and performs redundant bookkeeping even for pure operations. We propose GenExtension, which specializes the tracer to a given interpreter at translation time, eliminating dynamic dispatch and skipping recording and heap-cache invalidation for pure operations. We implemented a prototype in RPython and applied it to the PyPy interpreter. On 28 benchmarks from the PyPy benchmark suite, GenExtension reduces tracing time by 11\% (geometric mean) and resume data generation (the metadata needed to deoptimize back to the interpreter) by 28\%, while producing nearly equivalent machine code and leaving total execution time unchanged (0.99x). Extending the specialization to more operation classes to reduce total execution time is future work.},
url = {https://2026.ecoop.org/details/mplr-2026-papers/5/Generating-Interpreter-Specific-Tracers-for-Meta-Tracing-JIT-Compilers},
location = {Brussels, Belgium}
}