Python · Section 18
Performance
Big-O and the vocabulary of cost, choosing the right data structure (with the roadmap's own measured list-vs-set example), the six distinct bottleneck types, the profiling tools that replace guessing with measurement, and the optimization techniques — caching, batching, parallelization — governed by one rule: measure first, optimize second.
This section
- FundamentalsBig-O and complexity as the vocabulary for describing growth, the roadmap's own list-vs-set example as the concrete payoff of choosing the right data structure, and the six distinct root causes a slow application can actually have.3 core3 concepts
- Profiling toolstimeit for comparing small snippets, cProfile/pstats for finding what actually dominates a whole program's runtime, and tracemalloc/memory profilers/py-spy/APM for measuring and observing memory and running processes.3 core3 concepts
- OptimizationCaching and lazy evaluation to avoid unnecessary work, batching/connection pooling/query optimization to reduce round trips, parallelization/async I/O/serialization optimization for the remaining techniques, and the closing discipline that ties them all together: measure first, optimize second.4 core4 concepts

