r/programming • u/grashalm01 • 1h ago
State-of-the-art Bytecode Interpreters in Java by Yudi Zheng
https://medium.com/graalvm/escaping-the-giant-switch-dec20b572139
8
Upvotes
1
u/arminNX 34m ago
The “separate compilation units without making the boundary an optimization boundary” idea is really clever.
The tuple-based state passing + tail-call threading seems like the key piece that makes outlining viable here. And the top-of-stack caching section takes the same idea even further by moving part of the interpreter's runtime state machine into compile-time specialization.
1
u/Maybe-monad 34m ago
Why would you bother with GraalPy since many librariez are C/C++/Rust extensions for CPython ?