-O
Syntax
-O[n|l|m|h|hs|hz]
Parameters
| None* (Best debug support) |
| Low* |
| Medium |
| High, balanced |
| High, favoring speed |
| High, favoring size |
*All optimizations performed at level Low will be performed also at None. The only difference is that at level None, all non-static variables will live during their entire scope.
Description
Use this option to set the optimization level to be used by the compiler when optimizing the code. If no optimization option is specified, the optimization level Low is used by default. If only -O is used without any parameter, the optimization level High balanced is used.
A low level of optimization makes it relatively easy to follow the program flow in the debugger, and, conversely, a high level of optimization makes it relatively hard.
See also
Controlling compiler optimizations.
Caution
Project>Options>C/C++ Compiler>Optimizations