Object code optimizer: Difference between revisions

Content deleted Content added
Yobot (talk | contribs)
m WP:CHECKWIKI error 61 fixes + general fixes, References after punctuation per WP:REFPUNC and WP:PAIC using AWB (7510)
Line 1:
[[Image:Binary optimizer.png|thumb|180px|A binary optimizer takes the existing output from a compiler and produces a more optimal execution file with the same functionality.]]
An '''object code optimizer''', sometimes also known as a '''post pass optimizer''' or, for small sections of code, [[peephole optimization|'''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 [[algorithmic efficiency|algorithmically efficient]] (usually improved speed).
 
==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 [[Patch (computing)|patch]]ed) sections of the object code with more efficient code. The replacement code might replace a linear [[Lookup table|table lookup]] with a [[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 "[[Strength 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 this method was that the stock of already compiled customer programs ([[object code]]) could be improved almost 'instantly' with minimum 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 [[hardware]] upgrades, 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 seek to reduce only the ''size'' of binary files by eliminating duplicate library modules - without necessarily also improving their performance, while others utilize [[run-time]] metrics to [[introspect]]ively improve performance using techniques similar to [[Just In Time|JIT]] compilers.
 
====Recent developments====
More recently developed 'binary optimizers' for various platforms, some claiming [[Novelty (patent)|novelty]] but, nevertheless, essentially using the same (or similar) techniques described above, include:-
Line 16 ⟶ 20:
* Spike Executable Optimizer (Unix kernal) [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==
{{reflist}}
 
{{DEFAULTSORT:Object Code Optimizer}}
[[Category:Compiler optimizations]]
[[Category:Computer performance]]