#performance
5 articles
01
·Compilers & Runtimes·★ MEMBER·11 min read
Why Python Is Slow — Said Precisely
Saying Python is slow bundles three unrelated complaints: the cost of a single operation, the way data is laid out in memory, and the fact that CPU work does not spread across threads. Objects and the eval loop, the real reason NumPy is fast, what the GIL actually protects, and how far free-threaded builds since PEP 703 get you — from zero assumed knowledge.
02
·Compilers & Runtimes·★ MEMBER·10 min read
JIT and GC — Getting Faster While Running, Cleaning Up While Running
A just-in-time compiler and a garbage collector are both services that have to work without stopping the application. Hot spot detection, tiered compilation, inlining, speculation and deoptimization, generational GC, tri-color marking and write barriers — built up from zero, ending where you can read a GC log and a JIT log yourself.
03
·Data Structures·★ MEMBER·11 min read
Cache-Friendly Code — Why Two O(n) Loops Can Differ by 10×
Two implementations with identical complexity can differ by an order of magnitude, because the CPU never fetches one value — it fetches a 64-byte block. Locality, cache lines, arrays versus linked lists, AoS versus SoA, loop order and false sharing, from zero assumed background to checking it yourself with perf.
04
·Complexity·★ MEMBER·8 min read
When Big-O and Your Benchmarks Disagree — Caches, Branches, and Memory Bandwidth
Two O(n) programs can differ by orders of magnitude in the real world. This article unpacks what Big-O deliberately throws away — cache hierarchies, branch prediction, and memory bandwidth — and how to reason about each.
05
·Complexity·FREE·7 min read
Complexity From Scratch — What Big-O Actually Measures
What O(n), O(n log n) and O(n²) feel like as wall-clock time. Constant factors versus growth rate, trading time against space, and the three reasons your profiler disagrees with the textbook — assuming no prior knowledge.