Loop Unrolling
Loop unrolling: perform multiple loop iterations at the same time
Advantages of loop unrolling:
- more opportunities for super-scalar code
- more data re-use & pseudo-prefetch
- exploit presence of cache lines
- reduction in loop overhead (minor)
NOTE: Inner loops should never be unrolled by hand:
- compiler will typically unroll the inner loop the necessary amount for SWP