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


Tuning your program

When a program is comprehensible, you can assess its performance. A program that has a tangled control flow is difficult to understand and maintain. The tangled control flow also inhibits the optimization of the code.

Therefore, before you try to improve the performance directly, you need to assess certain aspects of your program:

  1. Examine the underlying algorithms for your program. For top performance, a sound algorithm is essential. For example, a sophisticated algorithm for sorting a million items can be hundreds of thousands times faster than a simple algorithm.
  2. Look at the data structures. They should be appropriate for the algorithm. When your program frequently accesses data, reduce the number of steps needed to access the data wherever possible.
  3. After you have improved the algorithm and data structures, look at other details of the COBOL source code that affect performance.

You can write programs that result in better generated code sequences and use system services better. These areas affect program performance:

related concepts
Optimization

related tasks
Using an optimal programming style
Choosing efficient data types
Handling tables efficiently
Optimizing your code
Choosing compiler features to enhance performance

related references
Performance-related compiler options
Runtime options


Terms of use | Feedback

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