Rational Developer for System z
Enterprise PL/I for z/OS, Version 3.8, Programming Guide

OPTIMIZE

The OPTIMIZE option specifies the type of optimization required:

Read syntax diagramSkip visual syntax diagram   .-NOOPTIMIZE-------------------.
>>-+-OPTIMIZE--+----------------+-+----------------------------><
               |    .-2----.    |
               '-(--+-TIME-+--)-'
                    +-0----+
                    '-3----'
 

ABBREVIATIONS: OPT, NOPT

OPTIMIZE(0)
Specifies fast compilation speed, but inhibits optimization.
OPTIMIZE(2)
Optimizes the machine instructions generated to produce a more efficient object program. This type of optimization can also reduce the amount of main storage required for the object module.
OPTIMIZE(3)
Performs all the optimizations done under OPTIMIZE(2) plus some additional optimizations. Under OPTIMIZE(3), the compiler will generally, but especially for programs with large blocks and many variables, generate smaller and more efficient object code. However, it may also take considerably more time and region to complete compiles under OPTIMIZE(3) than under OPTIMIZE(2).

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.


Terms of use | Feedback

This information center is powered by Eclipse technology. (http://www.eclipse.org)