Behind the Commit
Antonio Cuni (principal engineer at Anaconda, author of SPy, developer of PyScript and PyPy, co-founder of the HPy project, and creator of PDB++, Fancy Completer, and VMProf) shares why Python is slow and how SPy, a new statically compiled variant of Python, aims to be as fast as C while staying as Pythonic as Python. We discuss the trade-off between dynamic features and performance, how SPy's "red and blue" code model replaces best-effort JIT with predictable errors, why PyPy struggles with C extensions, and what "Pythonic" really means. Outline 00:00 - Episode highlights and introduction 00:40 - Why is Python so slow? 01:31 - Would a static Python be fast? 02:13 - What is SPy? 02:28 - What motivated you to create SPy? (Spoiler: frustration) 03:52 - Which ideas from PyPy and HPy went into SPy? 06:36 - Biggest challenges of building SPy 07:49 - What does "Pythonic" actually mean? 10:39 - Current roadmap and the two-level language idea 12:24 - Walking through the SPy compilation pipeline 13:57 - Red-shifting and the blue/red AST nodes 14:40 - Why blue and red? (No, it's not from The Matrix) 15:52 - PyPy vs SPy: when to use which 19:34 - C extensions and the C API problem 20:04 - How to actually make your Python code faster 23:34 - Memory management and garbage collection in SPy 24:44 - When will SPy be production-ready? 25:44 - How to contribute to SPy 26:26 - Where does the name "SPy" come from? Note: the episode was recorded in July 2025 and some features, such as list type, garbage collector, and documentation, have been implemented in the meantime. In the section below you can find the links to those features. Episode links – SPy on GitHub: https://github.com/spylang/spy [https://github.com/spylang/spy] – PyPy: https://pypy.org/ [https://pypy.org/] – HPy project: https://hpyproject.org/ [https://hpyproject.org/] – PyScript: https://pyscript.net/ [https://pyscript.net/] – Anaconda: https://www.anaconda.com/ [https://www.anaconda.com/] – decorators in SPy: https://github.com/spylang/spy/pull/225 [https://github.com/spylang/spy/pull/225] – SPy roadmap: https://github.com/spylang/spy/blob/main/ROADMAP.md [https://github.com/spylang/spy/blob/main/ROADMAP.md] – list type in SPy: https://github.com/spylang/spy/blob/main/stdlib/_list.spy [https://github.com/spylang/spy/blob/main/stdlib/_list.spy] – garbage collector in SPy: https://github.com/spylang/spy/pull/390 [https://github.com/spylang/spy/pull/390] – SPy documentation: https://spylang.github.io/docs/dev/ [https://spylang.github.io/docs/dev/] – series of blog posts on SPy: https://antocuni.eu/2025/10/29/inside-spy-part-1-motivations-and-goals/ [https://antocuni.eu/2025/10/29/inside-spy-part-1-motivations-and-goals/]
14 episoder
Kommentarer
0Vær den første til at kommentere
Tilmeld dig nu og bliv en del af Behind the Commit-fællesskabet!