Cache-Friendly Data Layouts
Design structures of arrays and pack data for cache locality.
The Memory Hierarchy
CPUs have multiple cache levels (L1, L2, L3) much faster than main memory. Cache-friendly code keeps hot data close to the CPU.
Cache Lines
Memory is fetched in cache lines — typically 64 bytes. Reading one byte loads the whole line. Use this to your advantage.