Loop unrolling
Pros
- Decrease loop overhead (branches, counter settings)
- Allows better scheduling
- Longer basic blocks hence better opportunities to hide latency of “long” operations and to prevent load delays
Cons
- Increases register pressure
- Increases code length (I-cache occupancy)
- Requires prologue or epilogue