Object code optimizer: Difference between revisions

Content deleted Content added
Rcfische2 (talk | contribs)
m ca
 
(39 intermediate revisions by 22 users not shown)
Line 1:
{{Short description|Aspect of software compilation}}
{{Multiple issues|
{{original research|date=November 2016}}
{{Confusing|reason=inconsistent|date=February 2018}}
}}
{{Use dmy dates|date=January 2020|cs1-dates=y}}
{{Use list-defined references|date=August 2022}}
[[Image:Binary optimizer.png|thumb|180px|A binary optimizer takes the existing output from a compiler and produces a better 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]]''', forms part of a software [[compiler]]. It takes the output from athe 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==
 
*"[[IBM]] Automatic Binary Optimizer for z/OS<ref>https://www.ibm.com/us-en/marketplace/improved-cobol-performance</ref>" (ABO) was introduced in 2015 as a cutting-edge technology designed to optimize the performance of [[COBOL]] applications on [[IBM Z]]<ref>https://www.ibm.com/it-infrastructure/z</ref> mainframes without the need for recompiling source. It uses advanced optimization technology shipped in the latest Enterprise COBOL<ref>https://www.ibm.com/us-en/marketplace/ibm-cobol</ref>. ABO optimizes compiled [[binaries]] without affecting program logic. As a result, the application runs faster but behavior remains unchanged so [[testing]] effort could be reduced. Clients normally don't [[recompile]] 100 percent of their code when they upgrade to new compiler or IBM Z hardware levels, so code that's not recompiled wouldn't be able to take advantage of features in new IBM Z hardware. Now with ABO, clients have one more option to reduce [[CPU]] utilization and operating costs of their business-critical COBOL applications.
* The earliest "COBOL Optimizer" was developed by [[Capex Corporation]] in the mid 1970s 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 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 [[strength reduction]]. For example, on the [[IBM/360]] hardware the <code>CLI</code> instruction was, depending on the particular model, between twice and 5 times as fast as a <code>CLC</code> instruction for single byte comparisons.<ref>http: name="IBM"//www.bitsavers.org/pdf/ibm/360/A22_6825-1_360instrTiming.pdf</ref><ref>http://portal.acm.org/citation.cfm?id name=358732&dl=GUIDE&dl=ACM<"Evans_1982"/ref>
 
===Advantages===
Line 22 ⟶ 25:
===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:
* [[IBM]] Automaticautomatic Binarybinary Optimizeroptimizer for z/OS (ABO) (2015)<ref>https: name="IBM_ABO_2015"//www.ibm.com/us-en/marketplace/improved-cobol-performance</ref>
* [[IBM]] automatic binary optimizer for z/OS (ABO) trial cloud service (2020)<ref name="IBM_ABO_2020"/>
*[[ The Sun Studio Binarybinary Codecode Optimizer]]optimizer<ref>http: name="Binopt"//developers.sun.com/solaris/articles/binopt.html</ref> - which requires a [[software performance analysis|profile]] phase beforehand
*Design and Engineering of a Dynamic Binary Optimizer - from [[IBM]] T. J. Watson Res. Center (February 2005)<ref>http://ieeexplore.ieee.org/Xplore/login.jsp?url=/iel5/5/30187/01386661.pdf?arnumber=1386661</ref><ref>http://portal.acm.org/citation.cfm?id=1254810.1254831</ref>
* Design and Engineering of a Dynamic Binary Optimizer — from [[IBM]] T. J. Watson Res. Center (February 2005)<ref name="Duesterwald_2005"/><ref name="Xu-Li-Bao-Wang-Huang_2007"/>
* QuaC: Binarybinary Optimizationoptimization for Fastfast [[self-modifying code|Runtimeruntime Codecode Generationgeneration]] in [[C (programming language)|C]]<ref>http: name="CSD_1994"//www.eecs.berkeley.edu/Pubs/TechRpts/1994/CSD-94-792.pdf</ref> - (which appears to include some elements of JIT)
* [[DynamoRIO]]
*COBRA: An Adaptive Runtime Binary Optimization Framework for Multithreaded Applications<ref>http://ieeexplore.ieee.org/xpl/freeabs_all.jsp?tp=&arnumber=4343832&isnumber=4343799</ref>
* COBRA: an adaptive runtime binary optimization framework for multithreaded applications<ref name="Kim-Hse-Yew_2007"/>
*Spike Executable Optimizer (Unix kernel)<ref>http://www.cesr.ncsu.edu/fddo4/papers/spike_fddo4.pdf</ref>
* Spike executable optimizer (Unix kernel)<ref name="Spike_2010"/>
*[http://www.cs.arizona.edu/solar/ "SOLAR" Software Optimization at Link-time And Run-time]
* "SOLAR" software optimization at link-time and run-time<ref name="SOLAR"/>
* Dynimize: CPU performance virtualization<ref name="Dynimize"/>
* BOLT: post-link optimizer built on top of the [[LLVM]] framework. Utilizing sample-based profiling, BOLT improves the performance of real-world applications even for highly optimized binaries built with both [[Feedback directed optimization|feedback directed optimization]] and [[link-time optimization]]. For [[GNU Compiler Collection|GCC]] and [[Clang]] compilers, BOLT speeds up their binaries by up to 20.4% on top of FDO and LTO, and up to 52.1% if the binaries are built without FDO and LTO.<ref name="Panchenko-Auler_2019"/>
 
==See also==
* [[Binary recompilation]]
*[[Dynamic dead code elimination]]
* [[Binary translation]]
* [[Dynamic dead code elimination]]
 
==References==
{{reflist}}|refs=
<ref name="IBM_ABO_2015">{{cite web |date=2015 |url=https://www.ibm.com/products/automatic-binary-optimizer-zos |title=IBM Automatic Binary Optimizer for z/OS - Overview |website=www.ibm.com |access-date=2020-05-15 |archive-date=2020-10-18 |archive-url=https://web.archive.org/web/20201018172402/https://www.ibm.com/products/automatic-binary-optimizer-zos |url-status=live}}</ref>
<ref name="IBM_ABO_2020">{{cite web |date=2020 |url=https://optimizer.ibm.com/ |title=IBM Automatic Binary Optimizer for z/OS Trial Cloud Service |website=optimizer.ibm.com |access-date=2021-10-27 |archive-date=2021-01-19 |archive-url=https://web.archive.org/web/20210119201500/https://optimizer.ibm.com/ |url-status=live}}</ref>
<ref name="Panchenko-Auler_2019">{{cite book |author-last1=Panchenko |author-first1=Maksim |author-last2=Auler |author-first2=Rafael |author-last3=Nell |author-first3=Bill |author-last4=Ottoni |author-first4=Guilherme |title=2019 IEEE/ACM International Symposium on Code Generation and Optimization (CGO) |chapter=BOLT: A Practical Binary Optimizer for Data Centers and Beyond |date=2019-02-16 |pages=2–14 |doi=10.1109/CGO.2019.8661201 |arxiv=1807.06735 |isbn=978-1-7281-1436-1 |s2cid=49869552}}</ref>
<ref name="IBM">{{cite web |url=http://www.bitsavers.org/pdf/ibm/360/A22_6825-1_360instrTiming.pdf |title=Archived copy |access-date=2010-01-07 |archive-date=2010-07-11 |archive-url=https://web.archive.org/web/20100711101128/http://bitsavers.org/pdf/ibm/360/A22_6825-1_360instrTiming.pdf |url-status=dead}}</ref>
<ref name="Evans_1982">{{cite journal |title=Software engineering for the Cobol environment |author-first=Michael |author-last=Evans |date=1982-12-01 |journal=Communications of the ACM |volume=25 |issue=12 |pages=874–882 |doi=10.1145/358728.358732 |s2cid=17268690 |doi-access=free }}</ref>
<ref name="Binopt">{{cite web |url=http://developers.sun.com/solaris/articles/binopt.html |title=The Binary Code Optimizer |access-date=2010-01-07 |archive-date=2010-07-22 |archive-url=https://web.archive.org/web/20100722060415/http://developers.sun.com/solaris/articles/binopt.html |url-status=live}}</ref>
<ref name="Duesterwald_2005">{{cite journal |doi=10.1109/JPROC.2004.840302 |title=Design and Engineering of a Dynamic Binary Optimizer |date=2005 |author-last=Duesterwald |author-first=E. |journal=Proceedings of the IEEE |volume=93 |issue=2 |pages=436–448 |s2cid=2217101}}</ref>
<ref name="Xu-Li-Bao-Wang-Huang_2007">{{cite book |chapter-url=https://doi.org/10.1145/1254810.1254831 |chapter=Metadata driven memory optimizations in dynamic binary translator |author-first1=Chaohao |author-last1=Xu |author-first2=Jianhui |author-last2=Li |author-first3=Tao |author-last3=Bao |author-first4=Yun |author-last4=Wang |author-first5=Bo |author-last5=Huang |title=Proceedings of the 3rd international conference on Virtual execution environments - VEE '07 |date=2007-06-13 |publisher=Association for Computing Machinery |pages=148–157 |via=ACM Digital Library |doi=10.1145/1254810.1254831 |isbn=978-1-59593630-1 |s2cid=15234434 |access-date=2021-10-27 |archive-date=2021-10-27 |archive-url=https://web.archive.org/web/20211027171912/https://dl.acm.org/doi/10.1145/1254810.1254831 |url-status=live}}</ref>
<ref name="CSD_1994">{{cite web |url=http://www.eecs.berkeley.edu/Pubs/TechRpts/1994/CSD-94-792.pdf |title=Archived copy |access-date=2010-01-07 |archive-date=2009-04-19 |archive-url=https://web.archive.org/web/20090419013547/http://www.eecs.berkeley.edu/Pubs/TechRpts/1994/CSD-94-792.pdf |url-status=live}}</ref>
<ref name="Kim-Hse-Yew_2007">{{cite book |doi=10.1109/ICPP.2007.23 |isbn=978-0-7695-2933-2 |chapter=COBRA: An Adaptive Runtime Binary Optimization Framework for Multithreaded Applications |title=2007 International Conference on Parallel Processing (ICPP 2007) |date=2007 |author-last1=Kim |author-first1=Jinpyo |author-last2=Hsu |author-first2=Wei-Chung |author-last3=Yew |author-first3=Pen-Chung |pages=25 |s2cid=15079211}}</ref>
<ref name="Spike_2010">{{cite web |url=http://www.cesr.ncsu.edu/fddo4/papers/spike_fddo4.pdf |title=Archived copy |access-date=2010-01-07 |archive-date=2010-09-11 |archive-url=https://web.archive.org/web/20100911004025/http://www.cesr.ncsu.edu/fddo4/papers/spike_fddo4.pdf |url-status=dead}}</ref>
<ref name="Dynimize">{{cite web |url=https://dynimize.com/product |title=Dynimize Product Overview |website=dynimize.com |access-date=2021-04-26 |archive-date=2021-10-25 |archive-url=https://web.archive.org/web/20211025205130/https://dynimize.com/product |url-status=live}}</ref>
<ref name="SOLAR">{{cite web |url=http://www.cs.arizona.edu/solar/ |title="SOLAR" Software Optimization at Link-time And Run-time|archive-url=https://web.archive.org/web/20160214082946/http://www.cs.arizona.edu/solar/ |archive-date=14 February 2016 }}</ref>
}}
 
{{DEFAULTSORT:Object Code Optimizer}}