Skip to main content

IAR Embedded Workbench for RX 5.20

Scope for performed optimizations

In this section:

You can decide whether optimizations should be performed on your whole application or on individual files. By default, the same types of optimizations are used for an entire project, but you should consider using different optimization settings for individual files. For example, put code that must execute quickly into a separate file and compile it for minimal execution time, and the rest of the code for minimal code size. This will give a small program, which is still fast enough where it matters.

You can also exclude individual functions from the performed optimizations. The #pragma optimize directive allows you to either lower the optimization level, or specify another type of optimization to be performed. See optimize, for information about the pragma directive.