TIL on January 30, 2026
SIMD
SIMD (Single Instruction, Multiple Data) lets a CPU do the same math on multiple numbers at once. If you have a list of 1,000 numbers and need to double each one, a normal CPU does it one at a time. SIMD does 4 or 8 at a time in a single step.
Where it matters: video codecs, game engines, ML inference, image processing—bulk numeric work on uniform data. Libraries like numpy and ffmpeg use SIMD under the hood.
Why not use it everywhere?
- Only works for the same operation on independent data—most logic is sequential or branching
- Memory is usually the bottleneck, not compute
- SIMD hates
ifstatements - Data must be packed contiguously in memory
You benefit from SIMD without touching it. It's plumbing—good to know it exists, rarely something you write yourself.