Python and PyPy performance (not) for dummies
summary
Shows concrete claims and tools: 7x average speedup on selected real-world benchmarks, a JIT that specializes hot loops with JIT guards and bailouts to reach near-C speed in the best cases, and measurable warmup costs before that. Demonstrates a built vmprof statistical profiler (Linux x86_64, ~300 Hz sampling) and a web UI, with profiling overhead around ~5% profiling overhead. Notes practical limits: CPython C‑API extensions run slowly on PyPy; prefer CFFI; warmup and specialization heuristics determine actual gains.
AI-written summary · about
chapters (24)
- 0:00Intro
- 0:30Premature optimization
- 1:20What is performance like
- 3:40Python performance
- 11:10PiePy performance
- 12:10Profiler
- 14:10Optimization
- 15:45Current releases
- 16:15Speed
- 17:42How it works
- 21:34Specialization
- 22:47Tradeoff
- 23:20Friendly to PyPy
- 24:43General advice
- 27:02Compatibility layer
- 28:19Optimize code
- 36:21Windows support
- 37:51FreeBusy
- 39:11Can I just replace Python with PyPy
- 40:11Garbage collector
- 42:51PyPy extension
- 44:08Time spent in PyPy
- 45:43Time spent in user code
- 46:54Python overhead








