Inside a PyPy JIT: is that even legal?
summary
Claims that the RPython toolchain automatically converts an interpreter into specialized code by applying partial evaluation: opcode dispatch and stack-state are inlined away, boxing is removed, and handlers collapse into direct operations. Example: the ABS function becomes a single function that extracts a low-level value, computes sign and multiply, and returns an unboxed long, with no interpreter loop remaining. The pipeline yields standalone, fast binaries (PyPy JIT generator style) and demonstrably removes interpretation overhead.
AI-written summary · about
chapters (6)
- 0:00Introduction to PyPy JIT
- 1:50Dynamic languages and DSLs
- 4:33Stack-based interpreter design
- 7:44Partial evaluation magic
- 12:21Optimizing interpreter code
- 16:42Performance and conclusion
related talks
22mPyPy hands-on
22mPyPy hands-on
45mTwo-level Just-in-Time Compilation with One Interpreter and One Engine
29mBuilding a JIT compiler for CPython
41mHow to write a JIT compiler in 30 minutes
22mPyPy and the future of the Python ecosystem
29mWhat they don't tell you about building a JIT compiler for CPython
22mPyPy in production
