Month 3 - Runtime and Performance: CPython Internals, GIL, GC, the Allocator¶
Goal: by the end of week 12 you can (a) read CPython bytecode and predict where the eval loop will spend its time, (b) explain refcounting, the cyclic GC, and generational thresholds, (c) characterize a workload as GIL-bound, allocator-bound, or I/O-bound from py-spy/scalene/memray output, and (d) apply the four tiers of optimization (algorithmic → vectorize → C extension → JIT) with judgment.
This is the hardest month of the curriculum. Take it seriously.
Weeks¶
- Week 9 - The CPython VM: Objects, Bytecode, the Eval Loop
- Week 10 - Memory: Refcounts, Cyclic GC, the
pymallocAllocator - Week 11 - The GIL, Free-Threaded Python, and the Concurrency Model
- Week 12 - The Optimization Ladder: Algorithm → Vectorize → Native → JIT