Improved code generation in the CPython JIT
Improved code generation in the CPython JIT
Posted Jan 19, 2024 12:14 UTC (Fri) by vstinner (subscriber, #42675)In reply to: Improved code generation in the CPython JIT by qys
Parent article: Improved code generation in the CPython JIT
It depends on what you mean by "debuggability". PEP 669 "Low Impact Monitoring for CPython" is a new API added to Python 3.12 to debug Python code with a low overhead. The idea is to use a different bytecode if code is being run in a debugger. The advantage is to avoid having to check if a debugger/profiler is being used before each instruction. For example, code coverage is faster with this new API.
PEP 669: https://peps.python.org/pep-0669/
By the way, the implementation of the copy-and-patch "JIT compiler" uses machine code generated by LLVM with tail call optimization :-) It just makes the implementation easier (to generate machine code ahead with LLVM.)
