Data-Oriented Design and CPU Caches
Why a loop that profiles as CPU-bound can really be memory-bound — struct layout, array-of-structs vs struct-of-arrays, and false sharing, all measured on real hardware (including a 128-byte-cache-line surprise).
Memory-bound masquerading as CPU-bound: struct field ordering (measured 40→24 bytes), array-of-structs vs struct-of-arrays on a 2M-record scan, and false sharing — where padding to the textbook 64 bytes left half the win on the table because Apple Silicon's cache lines are 128.