This repository contains the CPython fork for the paper Cross Module Quickening - The Curious Case of C Extensions.
The code is a fork of CPython version 3.12.0
and adds the optimization interface described in the paper.
The optimization interface is entirely optional.
If no extension registers optimizations, everything should work as usual.
You can find the most important changes in specialize.c (functions prefixed with _PyExternal
) and in ceval.c (opcode defintions ending with _EXTERNAL
).
For details on how to build CPython, please refer to the official documentation as well as the Dockerfile in the NPBench
repository.
The Dockerfile contains the specific build steps for this fork.