4.2 Compiler optimization
for code size versus speed
The compiler can optimize for either code size or performance.
The following options control whether the compiler optimizes for code
size or performance:
-Ospace
This option causes the compiler to optimize mainly
for code size. This is the default option.
-Otime
This option causes the compiler to optimize mainly
for speed.
For best results, you must build your application using the
most appropriate command-line option.
Note
These command-line options instruct the compiler to use optimizations
that deliver the effect wanted in the vast majority of cases. However,
it is not guaranteed that -Otime always generates faster
code, or that -Ospace always generates smaller
code.
Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers of your data.