Object code optimizer

Last updated

A binary optimizer takes the existing output from a compiler and produces either a better execution file or optimized machine code in live program memory, with the same functionality. Binary optimizer.png
A binary optimizer takes the existing output from a compiler and produces either a better execution file or optimized machine code in live program memory, with the same functionality.

An object code optimizer, also known as a binary optimizer, takes a program's object code or machine code either from a linked executable binary file, or from live program memory, and produces sections of optimized code, invoked through either redirection or code replacement, that is functionally equivalent yet more performant. Program speedup is a common optimization goal. Some are intended to modernize old binaries to take better advantage of updated hardware, [1] while others lean heavily on profile-guided optimization and interprocedural optimization to deliver performance gains. [2] Some utilize run-time mechanisms to introspectively improve performance using techniques similar to JIT compilers. [3]

Contents

Examples












Advantages

Some binary optimizers allow for the application of better compiler optimizations to executables where source code is not available, in some cases instantly with minimal effort. [5] They may allow for more accurate profile attribution when profile guided optimizations are applied. [22] Whole program optimizations can be applied to finished executables, beyond the scope of traditional source code compilation units. [10] Dynamic binary optimization allows for more accurate, flexible profiling information, specializing shared library code per process, and may not require changes to binaries on disk. [3]

See also

References

  1. 1 2 "System/360 Instruction Timing Information" (PDF). Archived from the original (PDF) on 2010-07-11. Retrieved 2010-01-07.
  2. 1 2 Panchenko, Maksim; Auler, Rafael; Nell, Bill; Ottoni, Guilherme (2019-02-16). "BOLT: A Practical Binary Optimizer for Data Centers and Beyond". 2019 IEEE/ACM International Symposium on Code Generation and Optimization (CGO). pp. 2–14. arXiv: 1807.06735 . doi:10.1109/CGO.2019.8661201. ISBN   978-1-7281-1436-1. S2CID   49869552.
  3. 1 2 3 "Transparent Dynamic Optimization: The Design and Implementation of Dynamo" (PDF). Archived from the original (PDF) on 2003-05-03.
  4. Evans, Michael (1982-12-01). "Software engineering for the Cobol environment". Communications of the ACM. 25 (12): 874–882. doi: 10.1145/358728.358732 . S2CID   17268690.
  5. 1 2 "IBM Automatic Binary Optimizer for z/OS". Archived from the original on 2025-12-16.
  6. Cohn, Robert S.; Goodwin, David W.; Lowney, P. Geoffrey (1997). "Optimizing Alpha Executables on Windows NT with Spike" (PDF). Digital Technical Journal. 9 (4): 3–20. Archived from the original on 2025-12-16.
  7. Flower, Richard; Luk, Chi-Keung; Muth, Robert; Patil, Harish; Shakshober, John; Cohn, Robert; Lowney, P. Geoffrey (2001). "Kernel Optimizations and Prefetch with the Spike Executable Optimizer with Spike".
  8. "The Binary Code Optimizer". Archived from the original on 2010-07-22. Retrieved 2010-01-07.
  9. "Oracle Solaris Binary Optimizer". Archived from the original on 2024-09-14.
  10. 1 2 Muth, R.; Debray, S. K.; Watterson, S.; De Bosschere, Koen (2001). "Alto: A Link-Time Optimizer for the Compaq Alpha" (PDF). Software—Practice and Experience. 31 (1): 67–101. Archived from the original (PDF) on 2008-02-21. Retrieved 2025-12-17.
  11. Debray, Saumya; Muth, Robert; Watterson, Scott (2001). Software Power Optimization via Post-Link-Time Binary Rewriting (PDF) (Technical report). Department of Computer Science, University of Arizona. Retrieved 2025-12-29.
  12. Schwarz, Benjamin William (2002). Post Link-Time Optimization on the Intel IA-32 Architecture (PDF) (Honors thesis). University of Arizona. Archived from the original (PDF) on 2006-03-01. Retrieved 2025-12-17.
  13. Snavely, Noah. Optimizing and Reverse Engineering Itanium Binaries (PDF) (Thesis). Archived from the original (PDF) on 2006-03-01. Retrieved 2025-12-17.
  14. De Sutter, Bjorn; De Bus, Bruno; De Bosschere, Koen; Debray, Saumya. Combining Global Code and Data Compaction (PDF). Department of Electronics and Information Systems, Ghent University / Department of Computer Science, University of Arizona. Retrieved 2025-12-29.
  15. ""SOLAR" Software Optimization at Link-time And Run-time". Archived from the original on 2016-02-14.
  16. Bruening, Derek; Garnett, Timothy; Amarasinghe, Saman (2003). An Infrastructure for Adaptive Dynamic Optimization. International Symposium on Code Generation and Optimization (CGO). Retrieved 2026-01-13.
  17. Lu, Jiwei; Chen, Howard; Fu, Rao; Hsu, Wei‑Chung; Othmer, Bobbie; Yew, Pen‑Chung (2003). The Performance of Runtime Data Cache Prefetching in a Dynamic Optimization System (PDF). MICRO 36 (36th Annual IEEE/ACM International Symposium on Microarchitecture). Archived from the original (PDF) on 2024-07-05. Retrieved 2025-12-18.
  18. Kim, Jinpyo; Hsu, Wei-Chung; Yew, Pen-Chung (2007). "COBRA: An Adaptive Runtime Binary Optimization Framework for Multithreaded Applications". 2007 International Conference on Parallel Processing (ICPP 2007). p. 25. doi:10.1109/ICPP.2007.23. ISBN   978-0-7695-2933-2. S2CID   15079211.
  19. 1 2 "Dynimize Product Overview". dynimize.com. Dynimize Inc. Archived from the original on 2025-08-11. Retrieved 2025-12-18.
  20. "Dynimize User Guide v2". dynimize.com. Dynimize Inc. Archived from the original on 2025-12-18. Retrieved 2025-12-18.
  21. "Improvements in MySQL & MariaDB CPU Performance With Dynimize". dynimize.com. Dynimize Inc. Archived from the original on 2024-06-23. Retrieved 2025-12-18.
  22. 1 2 "OptimizingLinux.md". GitHub. llvm/llvm-project. Archived from the original on 2025-08-02. Retrieved 2025-12-18.
  23. Shen, Han; Pszeniczny, Krzysztof; Lavaee, Rahman; Kumar, Snehasish; Tallam, Sriraman; Li, Xinliang David (2023). Propeller: A Profile Guided, Relinking Optimizer for Warehouse-Scale Applications. Proceedings of the 28th ACM International Conference on Architectural Support for Programming Languages and Operating Systems. ASPLOS '23. ACM. pp. 617–631. Archived from the original on 2025-07-02. Retrieved 2025-12-18.