Furious & Fast Python 7: Writing Fast Python Code
summary
Claims a concrete M-I-S-S-I framework (Measurement, Intuition, Structure, Specialization) and shows tools and data: benchmarks with scalene and pyspy reveal that a plain list comprehension is fastest across versions but which micro‑optimum wins flips between Python 3.5–3.9, a Python function call maps to ~7 C stack frames, numpy sometimes runs ~200× faster, and a tiny predicate push-down prototype (generators as first‑class thunks) demonstrates viable fusion and push‑down optimizations for simple cases while warning slots and blind micro‑jitting often mislead.
AI-written summary · about
chapters (9)
- 0:00Fast Python code intro
- 7:28MISSI optimization framework
- 10:36Static micro-optimizations fail
- 20:00Common speed intuitions debunked
- 32:36Structure for Python performance
- 44:31Restricted computation domains
- 57:22Specialization and structuring
- 1:03:38MISSI summary
- 1:05:43Q&A: graph libs & generators
related talks
30mWrite faster Python! Common performance anti patterns
42mIntuition vs. Reality: Surprising Truths in Python Performance
19mPython - best practices
34mMaking Python Faster with Free Threading and Mypyc
45mPython for Speed, Scale, and Science
32mWriting performant code for modern Python interpreters
48mPython Performance: Past, Present and Future
57mPython and PyPy performance (not) for dummies
