Get the latest tech news

A tail calling interpreter for Python (already landed in CPython)


It’s been nearly four years since I published Parsing Protobuf at 2+GB/s: HowI Learned To Love Tail Calls inC.In that article, I presented a technique I co-d...

In 2022-2024, Haoran Xu published a series of articles and papers about an ambitious and experimental effort to automatically generate interpreters and JIT compilers from a description of the language semantics. It is still an experimental project (for example, garbage collection is unimplemented, so the performance comparison disables GC for LuaJIT too); it would be cool if Deegen or something like it was eventually productionized and used in a mainstream language interpreter. The rationale given in n2920 does not mention the use case of tail call interpreters, even though this was the primary motivation for adding musttail to both Clang and GCC.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of python

python

Photo of interpreter

interpreter

Photo of cpython

cpython

Related news:

News photo

JesseSort: A novel sorting algorithm that is faster than Python's default sort.

News photo

Python 3.14 Alpha 5 Released With New Tail-Call Interpreter

News photo

Python 3.14 Lands A New Interpreter With 3~30% Faster Python Code