Performance
This folder has no README. Everything inside it is listed below.
Notes
- Profiling Python — cProfile, pstats, timeit Profile before optimizing. Most Python "slowness" lives in unexpected places — database queries, JSON parsing, redundant computations — not where intuition…
- Memory profiling — tracemalloc, memray, and what holds memory 4 Time profiling answers "what is slow". Memory profiling answers a question people get wrong in both directions: the service's memory keeps growing; is it a…
- Why Python is slow — and how to mitigate it CPython prioritizes simplicity, dynamism, and readability over raw speed.
- Native extensions — Cython, Numba, ctypes, PyO3 When pure Python is too slow even after algorithm and stdlib optimization, drop to native code.
- Async optimization — getting the most out of asyncio asyncio is great for I/O-bound concurrency but easy to misuse.
- Debugging a Live Production Incident 5 The earlier files in this folder profile code you can run locally.