Object code optimizer


An object code optimizer, sometimes also known as a post pass optimizer or, for small sections of code, peephole optimizer, takes the output from a source language compile step - the object code or binary file - and tries to replace identifiable sections of the code with replacement code that is more algorithmically efficient.

Examples

The main advantage of re-optimizing existing programs was that the stock of already compiled customer programs could be improved almost instantly with minimal effort, reducing CPU resources at a fixed cost. A disadvantage was that new releases of COBOL, for example, would require maintenance to the optimizer to cater for possibly changed internal COBOL algorithms. However, since new releases of COBOL compilers frequently coincided with hardware upgrades, the faster hardware would usually more than compensate for the application programs reverting to their pre-optimized versions.

Other optimizers

Some binary optimizers do executable compression, which reduces the size of binary files using generic data compression techniques, reducing storage requirements and transfer and loading times, but not improving run-time performance. Actual consolidation of duplicate library modules would also reduce memory requirements.
Some binary optimizers utilize run-time metrics to introspectively improve performance using techniques similar to JIT compilers.

Recent developments

More recently developed 'binary optimizers' for various platforms, some claiming novelty but, nevertheless, essentially using the same techniques described above, include: