Rational Developer for System z
COBOL for Windows, Version 7.5, Programming Guide


Performance-related compiler options

In the table below you can see a brief description of the purpose of each option, its performance advantages and disadvantages, and usage notes where applicable.

Table 75. Performance-related compiler options
Compiler option Purpose Performance advantages Performance disadvantages Usage notes
ARITH(EXTEND)

See ARITH.

To increase the maximum number of digits allowed for decimal numbers In general, none ARITH(EXTEND) causes some degradation in performance for all decimal data types due to larger intermediate results. The amount of degradation that you experience depends directly on the amount of decimal data that you use.
DYNAM To have subprograms (called through the CALL statement) dynamically loaded at run time Subprograms are easier to maintain, because the application does not have to be link-edited again if a subprogram is changed. There is a slight performance penalty, because the call must go through a library routine. To free virtual storage that is no longer needed, issue the CANCEL statement.
OPTIMIZE(STD)

(see OPTIMIZE)

To optimize generated code for better performance Generally results in more efficient runtime code Longer compile time: OPTIMIZE requires more processing time for compiles than NOOPTIMIZE. NOOPTIMIZE is generally used during program development when frequent compiles are needed; it also allows for symbolic debugging. For production runs, OPTIMIZE is recommended.
OPTIMIZE(FULL)

(see OPTIMIZE)

To optimize generated code for better performance and also optimize the DATA DIVISION Generally results in more efficient runtime code and less storage usage Longer compile time: OPTIMIZE requires more processing time for compiles than NOOPTIMIZE. OPT(FULL) deletes unused data items, which might be undesirable in the case of time stamps or data items that are used only as markers for dump reading.
NOSSRANGE

(see SSRANGE)

To verify that all table references and reference modification expressions are in proper bounds SSRANGE generates additional code for verifying table references. Using NOSSRANGE causes that code not to be generated. None In general, if you need to verify the table references only a few times instead of at every reference, coding your own checks might be faster than using SSRANGE. You can turn off SSRANGE at run time by using the CHECK(OFF) runtime option. For performance-sensitive applications, NOSSRANGE is recommended.
NOTEST

(see TEST)

To avoid the additional object code that would be produced to take full advantage of the Debug Perspective of Rational Developer for System z. TEST significantly enlarges the object file because it adds debugging information. When linking the program, you can direct the linker to exclude the debugging information, resulting in approximately the same size executable as would be created if the modules were compiled with NOTEST. If the debugging information is included in the executable, a slight performance degradation might occur because the larger executable will take longer to load and might increase paging. None TEST forces the NOOPTIMIZE compiler option into effect. For production runs, using NOTEST is recommended.
TRUNC(OPT)

(see TRUNC)

To avoid having code generated to truncate the receiving fields of arithmetic operations Does not generate extra code and generally improves performance Both TRUNC(BIN) and TRUNC(STD) generate extra code whenever a BINARY data item is changed. TRUNC(BIN) is usually the slowest of these options, though its performance was improved in COBOL for OS/390 & VM V2R2. TRUNC(STD) conforms to Standard COBOL 85, but TRUNC(BIN) and TRUNC(OPT) do not. With TRUNC(OPT), the compiler assumes that the data conforms to the PICTURE and USAGE specifications. TRUNC(OPT) is recommended where possible.

related concepts
Optimization

related tasks
Generating a list of compiler error messages
Choosing compiler features to enhance performance
Handling tables efficiently

related references
Sign representation of zoned and packed-decimal data


Terms of use | Feedback

Copyright IBM Corporation 1996, 2008.
This information center is powered by Eclipse technology. (http://www.eclipse.org)