#OPTIMIZE metastatement  

Purpose

Choose between faster execution or smaller code size.

Syntax

#OPTIMIZE [SIZE | SPEED]

Remarks

The #OPTIMIZE metastatement is used to tell the compiler your preferences in regards to the optimization of generated code.  You can specify optimization for either execution speed or smaller code size.  If not used, the default is to choose faster code speed.

If you choose the SPEED option, one of the primary actions of the compiler is to align heavily used code sections on an address boundary which is most beneficial to the CPU/FPU.

In some cases, the speed of looping mechanisms (FOR/NEXT, DO/UNTIL...) can be improved by as much as 100%, and occasionally even more.

See also

#ALIGN