Changes in COBOL module size after optimization

The size of an optimized module is typically larger than the original module due to the types of optimizations ABO does to improve performance.

Here are some common reasons for the module size increase:
  • Use of higher ARCH instructions that are usually 6 bytes versus 4 or 2 bytes in length for many lower ARCH instructions. For example:
    • Using Decimal Floating Point (DFP) for packed/zoned decimal arithmetic to improve performance
    • Replacing "base locator" pointers in the original module with more efficient but larger long displacement instructions
    • Using more than one move immediate instruction instead of one in memory move
  • A number of optimizations in ABO generate more code but shorter path length and better performance. For example:
    • More efficient handling of numeric edited variables
    • Unrolling long move and compare operations instead of using shorter but much slower instructions
    • Conditionally correcting decimal precision for binary data
  • The inlining of the behavior of various runtime library routines results in more code in the optimized module but much faster performance in many cases.

So for these and similar reasons the optimized modules produced by ABO are often larger than the original modules and require more on disk storage. However, the amount of memory used by the optimized program itself when running is the same as that used by the original module. A slightly higher EXCP count will sometimes be observed when running the optimized program but this is only due to the few extra I/O operations required to load the larger module.

Note that an optimized module will keep its size unchanged if the optimized code happens to be smaller than the original code.