Optimizing at level 0

Benefits at level 0

Begin your optimization process at -O0 which the compiler already specifies by default. For SMP programs, the closest equivalent to -O0 is -qsmp=noopt. This level performs basic analytical optimization by removing obviously redundant code, and can result in better compile time. It also ensures your code is algorithmically correct so you can move forward to more complex optimizations. -O0 also includes constant folding. The option -qfloat=nofold can be used to suppress folding floating-point operations. Optimizing at this level accurately preserves all debug information and can expose problems in existing code, such as uninitialized variables and bad casting.

Additionally, specifying -qarch at this level targets your application for a particular machine and can significantly improve performance by ensuring your application takes advantage of all applicable architectural benefits.

For more information on tuning, see Tuning for your system architecture.