Loop Unrolling
Noun · Development
Definitions
A compiler or manual optimization that replicates the body of a loop multiple times per iteration, reducing the overhead of branch instructions, loop counter increments, and condition checks while improving instruction-level parallelism.
In plain English: Instead of doing one thing per lap around a loop, you do four things per lap so you spend less time checking if you're done.
Example: "The compiler unrolled the inner loop 4x, which eliminated enough branch mispredictions to double throughput on that buffer copy."