This sub-page manages how the compiler will try to optimize the generated code and data. These options are the default ones, they may be overridden by the compiler's directives.
- Code / Fastest: (Default) When it is possible, all the code is generated inline (minimize the calls to standard routines). If the code size is not an issue, this is the best option. This mode may be activated by the $OPTIMIZE SPEED directive.
- Code / Smallest: When the size of the generated code is an issue, this options tells the compiler to use calls to standard subroutines when possible. This mode may be activated by the $OPTIMIZE MEMORY directive.
- Large pointers: For PIC18, this options is grayed (always large). This check box forces the pointers size to "large" model (Eg: 16-bit) instead of small model (8-bit). VAR parameters are assimilated to pointers. 8-bit pointers may be enough for small devices and it costs less RAM memory. This option may be overridden by the $POINTERS directive. Default is ON.
- Complete boolean evaluation: When an expression contains boolean OR and AND operators, the generated code stops the expression evaluation as soon as the result is definitely known. This option forces the compiler to evaluate all the expressions, using a boolean stack to store intermediate sub-expressions values. This option may be overridden by the $BOOLEVAL ($B) directive. Default is OFF.
- Optimize parameters passing: This option permits the compiler passing of procedures and function parameters into SFR registers (default). When OFF, all parameters are passed through dedicated GPR. As of today the optimization is limited to the W register. This option may be overridden by the $OPTIMIZE PARAMS directive. Default is ON.
- Optimize RAM allocation: This option tells the compiler to use the same RAM location for several variables when possible (no conflict). It may turned OFF to facilitate debugging. This option may be overridden by the $OPTIMIZE RAM directive. Default is ON.
- Optimize call/return pairs: A call followed by return is optimized by a goto; this will minimise the stack depth. As it may be inconvenient during step by step debugging, it may be disabled. This option may be overridden by the $OPTIMIZE CALLS directive. Default is ON.
- Optimize small enumerated as bit: call/return pairs: A call followed by return is optimized by a goto; this will minimise the stack depth. As it may be inconvenient during step by step debugging, it may be disabled. This option may be overridden by the $OPTIMIZE ENUMS directive. Default is ON.
- Default string size: This option defines the size of STRING when no explicit size is given. This option may be overridden by the $STRINGS directive. Default is 16.