Tuning your program
When a program is comprehensible, you can assess its performance. A tangled control flow makes a program difficult to understand and maintain, and inhibits the optimization of its code.
To improve the performance of your program, examine at least these aspects:
- Underlying algorithms: For best performance, using sound algorithms
is essential. For example:
- A sophisticated algorithm for sorting a million items might be hundreds of thousands of times faster than a simple algorithm.
- If the program frequently accesses data, reduce the number of steps to access the data.
- Data structures: Using data structures that are appropriate for the algorithms is essential.
You can write programs that result in better generated code sequences and use system services more efficiently. These additional aspects can affect performance:
- Coding techniques: Use a programming style that enables the optimizer to choose efficient data types and handle tables efficiently.
- Optimization: You can optimize code by using the
OPTIMIZE
compiler option. - Compiler options and
USE FOR DEBUGGING ON ALL PROCEDURES
: Some compiler options and language affect program efficiency. - Runtime environment: Consider your choice of runtime options.
- Running under CICS®, IMS, or VSAM: Heeding various tips can help make these programs run more efficiently.
related tasks
Using an optimal programming style
Choosing efficient data types
Handling tables efficiently
Optimizing your code
Choosing compiler features to enhance performance
Running efficiently with CICS, IMS, or VSAM
Language Environment® Programming Guide (Specifying runtime options)
Using an optimal programming style
Choosing efficient data types
Handling tables efficiently
Optimizing your code
Choosing compiler features to enhance performance
Running efficiently with CICS, IMS, or VSAM
Language Environment® Programming Guide (Specifying runtime options)
related references
Performance-related compiler options
Language Environment Programming Guide (Storage performance considerations)
Enterprise COBOL for z/OS® Performance Tuning Guide
Performance-related compiler options
Language Environment Programming Guide (Storage performance considerations)
Enterprise COBOL for z/OS® Performance Tuning Guide