How to tune compiler options to get the most out of V6

Enterprise COBOL V6 offers a number of new and substantially changed compiler options that can affect performance. This section highlights these options and gives recommendations on the optimal settings in order to achieve the best possible performance for your application.

Recommended compiler option set for best performance is: OPT(2), ARCH(x)

These options improve performance through:
  • Maximum level of optimization - OPT(2)
  • Deepest architecture exploitation – ARCH(x), where x = 7 | 8 | 9 | 10 | 11 | 12. Set the value as high as possible in accordance with the recommendations in this document and Enterprise COBOL for z/OS Programming Guide.

Additional settings for maximum performance applicable to some users are: STGOPT, AFP(NOVOLATILE), HGPR(NOPRESERVE)

These options improve performance through:
  • Removal of unreferenced data items – STGOPT
  • Omitting of saves/restores for floating point and high word registers – AFP and HGPR
Note: There are some important prerequisites for using these additional options as discussed below, and in Compiler options in the Enterprise COBOL for z/OS Programming Guide. Read and understand these options settings completely before using.
In short, these restrictions are:
  • Start of changeSTGOPT - You cannot use STGOPT if you relies upon any of the following data items:
    • Unreferenced LOCAL-STORAGE and non-external WORKING-STORAGE level-77 and level-01 elementary data items
    • Non-external level-01 group items if none of their subordinate items are referenced
    • Unreferenced special registers
    End of change
  • Omitting saves/restores for high word registers - HPGR
  • HGPR(NOPRESERVE) – must only be set when the caller is Enterprise COBOL, Enterprise PL/I or z/OS® XL C/C++ compiler-generated code

Next we will discuss the considerations when setting these and other performance-related compiler options.

related references
Performance-related compiler options (Enterprise COBOL for z/OS Programming Guide)