| Syntax: | Default: |
| opt(level, level) | opt(level, 0) |
This option determines what level of optimization to perform on your code.
By default, VisualAge C++ optimization is turned off.
Only one level of optimization can apply to a source file during a build. If you specify this option more than once for the same source files, settings that appear later in the configuration file override prior settings that apply to any of the same source files.
If you
are planning to debug C code, you should build with opt(level,
0). If you build with opt(level) setting of greater than 0, the
compiler produces debugging information as if the code is not
optimized, with the result that symbol and type information may
not be accurate.
If you
are planning to use a debugger other than the VisualAge C++
debugger, you should set opt(level, 0) to make full use of the
debugger.
You can set level to 0, 2, 3, or 4. The effect of each optimization level depends on your platform.
Optimization Levels on AIX Platforms
![]()
Optimization
Levels on OS/2 and Windows NT Platforms
Optimization level 0 performs only quick local optimizations.
Levels 2, 3 or 4 perform full optimization. Level 3 and 4 are the
same as level 2. Setting a level greater than zero enables or
implies the following options:
![]()
Incremental C++ Build
Configuration Files
![]()
Set Build Options
Build
Optimize Your
Application
Debug Optimized
Code
![]()
Optimization Options
![]()
Optimization Options
