==Examples==
* The "COBOL Optimizer" developed by [[Capex Corporation]] in the mid 1970's for [[COBOL]]. This type of optimizer depended, in this case, upon knowledge of 'weaknesses' in the standard IBM COBOL compiler, and actually replaced (or [[Patchpatch (computing)|patch]]ed) sections of the object code with more efficient code. The replacement code might replace a linear [[Lookuplookup table|table lookup]] with a [[binary search algorithm|binary search]] for example or sometimes simply replace a relatively 'slow' instruction with a known faster one that was otherwise functionally equivalent within its context. This technique is now known as "[[Strengthstrength reduction]]". For example on the [[IBM/360]] hardware the '''CLI''' instruction was, depending on the particular model, between twice and 5 times as fast as a '''CLC''' instruction for single byte comparisons.<ref>http://www.bitsavers.org/pdf/ibm/360/A22_6825-1_360instrTiming.pdf</ref><ref>http://portal.acm.org/citation.cfm?id=358732&dl=GUIDE&dl=ACM</ref>
===Advantages===
The main advantage of thisre-optimizing methodexisting programs was that the stock of already compiled customer programs ([[object code]]) could be improved almost 'instantly' with minimumminimal effort, reducing [[CPU]] resources at a fixed cost (the price of the [[proprietary software]]). A disadvantage was that new releases of COBOL, for example, would require (charged) maintenance to the optimizer to cater for possibly changed internal COBOL algorithms. However, since new releases of COBOL compilers frequently coincided with [[Computercomputer hardware|hardware]] upgrades[[upgrade]]s, the faster hardware would usually more than compensate for the application programs reverting to their pre-optimized versions (until a supporting optimizer was released).
===Other optimizers using the same concept===
Some binary optimizers seeksuch toas reduce[[UPX]] onlydo [[executable compression]], which reduces the ''size'' of binary files byusing eliminatinggeneric duplicate[[data librarycompression]] modulestechniques, -reducing withoutstorage necessarilyrequirements alsoand improvingtransfer theirand performanceloading times, whilebut othersnot utilize [[run time (program lifecycleimproving phase)|run-time]] metricsperformance. toActual [[introspect]]ivelyconsolidation improveof performanceduplicate usinglibrary techniquesmodules similarwould toalso [[Just-in-timereduce compilation|JIT]]memory compilersrequirements.
Some binary optimizers utilize [[run time (program lifecycle phase)|run-time]] metrics ([[profiling (computer programming)|profiling]]) to introspectively improve performance using techniques similar to [[just-in-time compilation|JIT]] compilers.
===Recent developments===
More recently developed 'binary optimizers' for various platforms, some claiming [[Noveltynovelty (patent)|novelty]] but, nevertheless, essentially using the same (or similar) techniques described above, include:-
* [[The Sun Studio Binary Code Optimizer]] [http://developers.sun.com/solaris/articles/binopt.html] - which requires a [[Softwaresoftware performance analysis|profile]] phase beforehand
* Design and Engineering of a Dynamic Binary Optimizer - from [[IBM]] T. J. Watson Res. Center (Feb 2005) [http://ieeexplore.ieee.org/Xplore/login.jsp?url=/iel5/5/30187/01386661.pdf?arnumber=1386661] [http://portal.acm.org/citation.cfm?id=1254810.1254831]
* QuaC: Binary Optimization for Fast [[self-modifying code|Runtime Code Generation]] in [[C (programming language)|C]] [http://www.eecs.berkeley.edu/Pubs/TechRpts/1994/CSD-94-792.pdf] - (which appears to include some elements of JIT)
* [[DynamoRIO]]
* COBRA: An Adaptive Runtime Binary Optimization Framework for Multithreaded Applications [http://ieeexplore.ieee.org/xpl/freeabs_all.jsp?tp=&arnumber=4343832&isnumber=4343799]
* Spike Executable Optimizer (Unix kernel) [http://www.cesr.ncsu.edu/fddo4/papers/spike_fddo4.pdf]
* [http://www.cs.arizona.edu/solar/ "SOLAR" Software Optimization at Link-time And Run-time]
==References==
|