Tutorial sequence
Faster Python, Measured
6of 6 published
- 01Read
intermediate / 28 min
How to benchmark Python without lying to yourself
Design repeatable timing experiments that measure the workload you actually care about.
- 02Read
intermediate / 30 min
Profile first: finding where the time actually went
Use cProfile and pstats to locate expensive call paths before choosing what to optimize.
- 03Read
intermediate / 32 min
The fastest operation is the one your algorithm avoids
Remove repeated work with better structures, indexes, sorting strategies, batching, and precomputation.
- 04Read
advanced / 31 min
Allocation is work: object churn and memory locality
Measure temporary objects, retained memory, and data layout before trading clarity for reuse.
- 05Read
advanced / 30 min
What CPython's specializing interpreter optimizes for you
Inspect how CPython 3.14 adapts hot bytecode to stable runtime types, and where it cannot help.
- 06Read
advanced / 33 min
Crossing the Python boundary
Move useful work across Python, native, I/O, and process boundaries without optimizing the wrong crossing.