SPy (Static Python) lang: fast as C, Pythonic as Python
summary
SPy is a new statically typed Python variant that enforces function signatures at module boundaries and uses red‑shift partial evaluation to precompute everything that can be done at import time, leaving a small fast core. The toolchain runs an interpreter for development and generates C and WASM for production (ELF binaries, Node/browser via WASM, CFFI-backed CPython extensions). Demo replaces a slow NumPy pipeline (0.2 FPS) with a Spy version at ~60 FPS; lists and dicts are not finished yet.
AI-written summary · about
chapters (11)
- 0:00The problem with performance
- 2:35Introducing the SPy project
- 6:16Goals and status of SPy
- 10:55Real-time image processing demo
- 12:52Architecture and compilation
- 18:30Redshifting and partial evaluation
- 23:58Language rules and semantics
- 30:43Generics and closures
- 33:50Type checking and dispatch
- 37:24Low-level core and abstractions
- 40:32Future work and Q&A
related talks
33mSPy (Static Python) lang: fast as C, Pythonic as Python
21mFrom PyPerf to py-spy - Everything You Need to Know About Python Profilers
22mPyPy and the future of the Python ecosystem
39mPyScript - Python in the Browser
01h 12mFurious & Fast Python 7: Writing Fast Python Code
59mMyths and fairy tales around Python performance
01h 05mHigh-Performance Python: Faster Type Checking and Free Threaded Execution
22mPyPy hands-on
