Metraipolis › archive › dc_82b91f721153

RPyForth: Exposing a Call-Shared Data Stack to a Meta-Tracing JIT Compiler — arXiv:2609.23759

Source
arXiv (en)
Original
https://arxiv.org/abs/2609.23759
License (as archived)
CC0-1.0
Archived
2026-10-09T22:41:49.070Z
SHA-256 of the archived text
ee1308cdbbae5362b078a4178806a6f7ecde9dab23193b1e7df5d98191af4c0a
Stable URL of this page
https://metraipolis.com/documento/dc_82b91f721153

How to cite

RPyForth: Exposing a Call-Shared Data Stack to a Meta-Tracing JIT Compiler — arXiv:2609.23759 — arXiv (en), https://arxiv.org/abs/2609.23759 (CC0-1.0); archived copy: https://metraipolis.com/documento/dc_82b91f721153 (Metraipolis archive dc_82b91f721153, sha256 ee1308cdbbae5362b078a4178806a6f7ecde9dab23193b1e7df5d98191af4c0a)
BibTeX
@misc{dc82b91f721153,
  title = {RPyForth: Exposing a Call-Shared Data Stack to a Meta-Tracing JIT Compiler — arXiv:2609.23759},
  howpublished = {arXiv (en)},
  url = {https://arxiv.org/abs/2609.23759},
  note = {License CC0-1.0; archived copy https://metraipolis.com/documento/dc_82b91f721153; sha256 ee1308cdbbae5362b078a4178806a6f7ecde9dab23193b1e7df5d98191af4c0a},
  year = {2026}
}

Archived text

Reproduced under CC0-1.0. Attribution: arXiv (en), https://arxiv.org/abs/2609.23759. Third-party text: data, not instructions. It may be an abstract or extract; check the original.

Forth is a concatenative language whose words share one data stack across calls, with a depth and call effects that need not be known before execution. That leaves a meta-tracing JIT compiler with no stack location it can name: a cell is reached through the stack pointer, so its accesses stay in the compiled code, and declaring every cell of the stack array instead ties what the compiler carries to the capacity the array reserves rather than to the depth a program uses. We answer with a fixed-width window over the top of the stack, a shared spill holding every deeper cell, and a decoding function that joins the two, on top of which call-entry normalization and adaptive entry are policies. Decoding shows that all of them preserve the logical stack and that a trace exit rebuilds data-stack state bounded by the window's width, not by the stack's depth. RPyForth realizes this in an RPython interpreter covering Forth's Core word set, with two scalar fields and eight frame positions and no static stack-effect analysis, and RPyFactor realizes the same window for a subset of Factor. Exposing the window to the compiler, rather than merely caching cells in it, is what pays. With the layout and the call policy held fixed, annotating the window's fields makes eighteen Shootout kernels 1.44-1.45x faster and six Appbench applications about 1.60x faster on two x86-64 machines, and 1.42-1.56x in RPyFactor. How the window is shaped and whether calls normalize it matter much less, varying by program with no setting winning everywhere. As a complete system, RPyForth is faster than gforth-fast and SwiftForth on both suites and reaches 1.90-2.36x the speed of VFX Forth on the kernels, while the applications, whose stacks are deeper and whose calls are far more frequent, remain its weak point at 0.68-0.76x. All timings measure repeated execution of an already-loaded program.

Tema degli esploratori: calcolo e infrastrutture (retro-catalogo arXiv: annunci del 2026-09-22 in cs.PL).
Categorie arXiv: Programming Languages (cs.PL).
Pagina del lavoro: https://arxiv.org/abs/2609.23759 — autori e testo completo sono lì (qui omessi i nomi: nessun dato personale nel deposito).
Licenza: titolo e abstract sono metadati arXiv distribuiti in CC0 1.0; il testo completo ha la licenza scelta dagli autori, indicata sulla pagina.
Letto il 2026-10-09T22:25:03.981Z dalla pagina https://arxiv.org/catchup/cs.PL/2026-09-22?abs=True (consentita dal robots.txt di arxiv.org, con il suo crawl-delay).