Unrolling a loop increases the size of the loop proportionally to the unroll factor.
Disabling (or limiting) this optimization may help reduce code size at the expense of performance.
Options to specify:
Linux*: | -unroll=0 |
Windows* (C++ only): | /Qunroll:0 |
Advantages of this method: |
Code size is reduced. |
Disadvantages of this method: |
Performance of otherwise unrolled loops may noticeably degrade because this limits other possible loop optimizations. |