Every CPU runs a stream of instructions. For most of computing history, each instruction operated on one number at a time: add two integers, write the result, move on. The program loops over arrays element by element, one clock per value.
SIMD — Single Instruction, Multiple Data — breaks that constraint. Instead of one 32-bit add, a SIMD register packs four, eight, or sixteen values side by side, and a single instruction adds them all in parallel. The loop body does the same work; the hardware just runs it across a whole lane at once.
The idea is not new — Cray supercomputers used vector registers in the 1970s. But it became universal in 1996 when Intel shipped MMX, and has accelerated ever since: SSE (1999), SSE2 (2001), AVX (2011), AVX-512 (2017). Today every smartphone, laptop, and server runs SIMD every second without the programmer even noticing — the compiler handles it automatically.
Understanding SIMD matters for algorithm design because raw algorithmic improvements and SIMD often stack: a algorithm vectorized by beats both a slow scalar loop and a fast loop that ignores SIMD.
Comments
Loading comments...