Choosing compiler features to enhance performance

Your choice of performance-related compiler options and your use of the USE FOR DEBUGGING ON ALL PROCEDURES statement can affect how well your program is optimized.

About this task

You might have a customized system that requires certain options for optimum performance. Do these steps:

Procedure

  1. To see what your system defaults are, get a short listing for any program and review the listed option settings.
  2. Determine which options are fixed as nonoverridable at your installation by checking with your system programmer.
  3. For the options not fixed at installation, select performance-related options for compiling your programs.

    Important: Confer with your system programmer about how to tune COBOL programs. Doing so will ensure that the options you choose are appropriate for programs at your site.

Results

Another compiler feature to consider is the USE FOR DEBUGGING ON ALL PROCEDURES statement. It can greatly affect the compiler optimizer. The ON ALL PROCEDURES option generates extra code at each transfer to a procedure name. Although very useful for debugging, it can make the program significantly larger and inhibit optimization substantially.

Although COBOL allows segmentation language, you will not improve storage allocation by using it, because COBOL does not perform overlay.

Related concepts  
Optimization

Related tasks  
Optimizing your code  
Getting listings

Related references  
Performance-related compiler options