Myths and fairy tales around Python performance
summary
Argues that common fixes—static typing, JIT, or compiling to LLVM—help some hotspots but don’t solve core limits: Python’s dynamic semantics, pointer-chasing object layout and cache misses, and cross-language call overhead. Uses PyPy and C extensions as concrete examples, cites an 80/20/Amdahl tradeoff, shows real failures (a dict key turning Unicode caused a 2× slowdown; defining a class inside a function forced constant deoptimizations until moved out), tests Cython/Syon results, notes GIL removal is experimental, and presents SPy (Static Python) as a research path.
AI-written summary · about
chapters (13)
- 0:00Introduction and background
- 2:30The myths of Python speed
- 5:59Optimization limits
- 9:14Interpreters vs. compilers
- 13:24The challenge of static types
- 17:21JIT compilers and trade-offs
- 22:28The optimization chase
- 25:02Dynamicity as a double-edged sword
- 28:33Code patterns and pitfalls
- 34:23Abstraction overhead
- 37:22Memory management constraints
- 40:41Future path for performance
- 44:07Q&A session
related talks
57mPython and PyPy performance (not) for dummies
48mPython Performance: Past, Present and Future
49mThe Evolution of Python: Progress or Dead End
22mPyPy and the future of the Python ecosystem
32mWriting performant code for modern Python interpreters
23mMemoirs of a Python Object: Memory Management and Improving Performance
26mWhy are Python and Ruby slow?
01h 03mA tour of CPython's runtime
