What Backend Engineers Need to Know About CPU Architecture
summary
Overview of CPU microarchitecture concepts relevant to backend engineers: cache hierarchy, pipelines, vector (SIMD) instructions, and other on-chip features, including differences between x86 and ARM. Practical guidance on writing code that maximizes CPU efficiency (avoiding long memory stalls and extracting performance) based on decades of experience in performance optimization.
AI-written summary · about
chapters (22)
- 0:00Introduction
- 1:13CPU architecture matters
- 5:08CPU speed limits
- 6:10How CPUs speed up
- 7:33Vectorization in CPUs
- 10:00CPU pipeline execution
- 14:38Pipeline hazards
- 14:59CPU architecture overview
- 17:02Memory hierarchy and caches
- 19:50Moving data into cache
- 21:56Prefetching data
- 22:39Memory bus access
- 24:05ARM vs Intel
- 26:14Matrix multiplication perf
- 27:39Maximizing CPU use
- 28:02Code patterns to avoid
- 29:08Optimizing loops
- 30:52Compiler optimizations
- 31:36Compiler hints
- 32:19Optimized libraries
- 32:41Profiling and optimization
- 33:24Summary
