To assist in the optimization of the code, you should use the OPTIMIZE compiler option. With the
OPTIMIZE(STD) or OPTIMIZE(FULL) options in effect, you may receive optimizations that include:
NOOPTIMIZE also makes it easier to debug a program since code is not moved; NOOPTIMIZE is required when using the TEST compiler option with a value other than TEST(NONE).
OPTIMIZE requires more CPU time for compiles than NOOPTIMIZE, but generally produces more efficient run-time code. For production runs, OPTIMIZE is recommended.
Performance considerations using OPTIMIZE:
On the average, OPTIMIZE(STD) was 1% faster than NOOPTIMIZE, with a range of 12% faster to equivalent.
On the average, OPTIMIZE(FULL) was equivalent to OPTIMIZE(STD).
One RENT program calling a RENT subprogram with 500 unreferenced data items with VALUE clauses was 9% faster with OPTIMIZE(FULL) or OPT(STD) compared to NOOPT.
The same RENT program calling a RENT subprogram with 500 unreferenced data items with VALUE clauses using the IS INITIAL clause on the PROGRAM-ID statement was 90% faster with OPTIMIZE(FULL) compared to OPT(STD).
- eliminating unnecessary branches simplifying inefficient branches
- simplifying the code for the out-of-line PERFORM statement, moving the performed paragraphs in-line, where possible
- simplifying the code for a CALL to a contained (nested) program, moving the called statements in-line, where possible
- eliminating duplicate computations
- eliminating constant computations
- aggregating moves of contiguous, equal-sized items into a single move
- deleting unreachable code
- deleting unreferenced data items and the associated code to initialize their VALUE clauses
NOOPTIMIZE also makes it easier to debug a program since code is not moved; NOOPTIMIZE is required when using the TEST compiler option with a value other than TEST(NONE).
OPTIMIZE requires more CPU time for compiles than NOOPTIMIZE, but generally produces more efficient run-time code. For production runs, OPTIMIZE is recommended.
Performance considerations using OPTIMIZE:
On the average, OPTIMIZE(STD) was 1% faster than NOOPTIMIZE, with a range of 12% faster to equivalent.
On the average, OPTIMIZE(FULL) was equivalent to OPTIMIZE(STD).
One RENT program calling a RENT subprogram with 500 unreferenced data items with VALUE clauses was 9% faster with OPTIMIZE(FULL) or OPT(STD) compared to NOOPT.
The same RENT program calling a RENT subprogram with 500 unreferenced data items with VALUE clauses using the IS INITIAL clause on the PROGRAM-ID statement was 90% faster with OPTIMIZE(FULL) compared to OPT(STD).
No comments:
Post a Comment