Powered by OpenAIRE graph
Found an issue? Give us feedback
image/svg+xml art designer at PLoS, modified by Wikipedia users Nina, Beao, JakobVoss, and AnonMoos Open Access logo, converted into svg, designed by PLoS. This version with transparent background. http://commons.wikimedia.org/wiki/File:Open_Access_logo_PLoS_white.svg art designer at PLoS, modified by Wikipedia users Nina, Beao, JakobVoss, and AnonMoos http://www.plos.org/ ZENODOarrow_drop_down
image/svg+xml art designer at PLoS, modified by Wikipedia users Nina, Beao, JakobVoss, and AnonMoos Open Access logo, converted into svg, designed by PLoS. This version with transparent background. http://commons.wikimedia.org/wiki/File:Open_Access_logo_PLoS_white.svg art designer at PLoS, modified by Wikipedia users Nina, Beao, JakobVoss, and AnonMoos http://www.plos.org/
ZENODO
Preprint . 2026
License: CC BY
Data sources: ZENODO
ZENODO
Preprint . 2026
License: CC BY
Data sources: Datacite
ZENODO
Preprint . 2026
License: CC BY
Data sources: Datacite
versions View all 2 versions
addClaim

Closing the Compiler Loop: Toward a Self-Hosting, Dependency-Free Python JIT

Authors: Hartshorn, Brent;

Closing the Compiler Loop: Toward a Self-Hosting, Dependency-Free Python JIT

Abstract

In June 2026 the CPython Steering Council paused new work on the experimental copy-and-patch JIT and requested a Standards-Track PEP, explicitly inviting alternative proposalsand suggesting the design describe “a JIT infrastructure that can support multiple implemen-tation strategies” rather than a single one. We accept that invitation. Our position is that thedecisive lever for high-performance dynamic-language execution is not any single tier or trickbut co-design across every layer of the stack at once—from the source dialect, through a whole-program-optimizing source-to-C transpiler, down to bare-metal thread context switching and aC language extended with call-graph contracts. Building on the minipy/ShivyCX pipeline, inwhich the entire runtime is written in one restricted-Python dialect and compiled as a singlewhole program, we report three results that together move the system decisively toward full self-containment. First, the runtime’s front end —a fully dynamic PEG parser—compiles straight tonative code through the same pipeline that compiles the interpreter, verified byte-identical toCPython across a four-way differential test. Second, the transpiler itself (py2c, ∼14,000 lines)now compiles and runs on the interpreter it produces: minipy compiles all 648 of its functions,the module fully initializes, and it begins transpiling small programs—closing a meta-circularloop between the compiler and its runtime. Third, we replace the external assembler: rasm,an x86-64 assembler written in the same dialect, encodes ShivyCX’s output byte-identicallyto GNU as (100/100 instruction forms) and emits ELF objects that link and run correctlyend-to-end across a program battery (9/9). With a native front end, a self-hosting transpiler,and an in-dialect assembler, the only external tool left in the self-hosted path is the systemlinker—narrowing the distance to a fully self-hosted, dependency-free JIT to a single, namedcomponent, and directly answering the two concerns raised against the current CPython JIT:its build-time LLVM dependency and its uncertain long-term maintainability.

  • BIP!
    Impact byBIP!
    selected citations
    These citations are derived from selected sources.
    This is an alternative to the "Influence" indicator, which also reflects the overall/total impact of an article in the research community at large, based on the underlying citation network (diachronically).
    0
    popularity
    This indicator reflects the "current" impact/attention (the "hype") of an article in the research community at large, based on the underlying citation network.
    Average
    influence
    This indicator reflects the overall/total impact of an article in the research community at large, based on the underlying citation network (diachronically).
    Average
    impulse
    This indicator reflects the initial momentum of an article directly after its publication, based on the underlying citation network.
    Average
Powered by OpenAIRE graph
Found an issue? Give us feedback
selected citations
These citations are derived from selected sources.
This is an alternative to the "Influence" indicator, which also reflects the overall/total impact of an article in the research community at large, based on the underlying citation network (diachronically).
BIP!Citations provided by BIP!
popularity
This indicator reflects the "current" impact/attention (the "hype") of an article in the research community at large, based on the underlying citation network.
BIP!Popularity provided by BIP!
influence
This indicator reflects the overall/total impact of an article in the research community at large, based on the underlying citation network (diachronically).
BIP!Influence provided by BIP!
impulse
This indicator reflects the initial momentum of an article directly after its publication, based on the underlying citation network.
BIP!Impulse provided by BIP!
0
Average
Average
Average