The OPTIMIZE option specifies the type of optimization required:
.-NOOPTIMIZE-------------------. >>-+-OPTIMIZE--+----------------+-+---------------------------->< | .-2----. | '-(--+-TIME-+--)-' +-0----+ '-3----'
ABBREVIATIONS: OPT, NOPT
It is strongly recommended that the DFT(REORDER) option be used with the OPTIMIZE option. In fact, the effect of OPTIMIZE is severely limited for any PROCEDURE or BEGIN-block for which all of the following are true:
The use of OPTIMIZE(2) could result in a substantial increase in compile time over NOOPTIMIZE and a substantial increase in the space required. For example, compiling a large program at OPTIMIZE(2) might take several minutes and could require a region of 75M or more.
The use of OPTIMIZE(3) will increase the time and region needed for a compile over what is needed under OPTIMIZE(2). For large programs, the time to compile a program under OPTIMIZE(3) can be more than twice as long as under OPTIMIZE(2).
During optimization the compiler can move code to increase run-time efficiency. As a result, statement numbers in the program listing might not correspond to the statement numbers used in run-time messages.
NOOPTIMIZE is the equivalent of OPTIMIZE(0).
OPTIMIZE(TIME) is the equivalent of OPTIMIZE(2).
Note that the use of OPTIMIZE(2) or OPTIMIZE(3) severely limits the functionality of the TEST option. For example:
For more information on choosing the best options to improve the performance of your code, see Improving performance.