Changing loop unrolling maximum increment bound highly increase code size.

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Changing loop unrolling maximum increment bound highly increase code size.

1,024件の閲覧回数
freerunner
Contributor I

I would like to adopt the loop unrolling with simple "for" statements, with a counter increase upper bound of 18 (instead of using the default: 16) but what I see building my program is that the code size is highly increased instead of decreasing.

 

How can this happen?

 

What i've done is just putting the command "i18" in the project settings of loop unrolling and using #PRAGMA LOOP_UNROLL before the for loop I would like to unroll.

 

Thanks in advance

ラベル(1)
0 件の賞賛
返信
1 返信

838件の閲覧回数
NavidadRedivivu
Contributor III

Check how loop unrolling works. The compiler manual contains quite good examples. Wikipedia helps too. What loop unrolling does is to inline each iteration of the loop, giving up the loop control instructions, thus resulting in faster but usually much larger code.

0 件の賞賛
返信