The topic of instruction specialization has come up in relation to PEP 703 (no-gil), where @colesbury limited instruction specialization to a single time. I’m unclear on the details, but is there data to indicate that specialization of an individual bytecode instruction often occurs repeatedly? Where can I read about instruction specialization other than browsing the source code? I saw a PEP (659), but it seems rather thin on details.
Not one of the Faster CPython people, but some resources include:
- The Faster CPython
ideasrepo and the various files, Readme links and issues therein, which mostly focuses on what’s actively in progress or planned
- Brandt Bucher’s PyCon 2023 talk on the specializing interpreter (Slides, Video)
- Some readmes within the source code, e.g. adaptive.md, give some specific implementation details
- Guido’s devguide overview of the 3.11 interpreter gives a high-level summary and pointers to the source code, but likely not the specialization details you are looking for