encyclopegia.org

Superoptimization

Superoptimization is the process where a compiler automatically finds the optimal sequence for a loop-free sequence of instructions. Real-world compilers generally cannot produce genuinely optimal code, and while most standard compiler optimizations only improve code partly, a superoptimizer's goal is to find the optimal sequence, the canonical form. Superoptimizers can be used to improve conventional optimizers by highlighting missed opportunities so a human can write additional rules.

Superoptimization is the process where a compiler automatically finds the optimal sequence for a loop-free sequence of instructions. Real-world compilers generally cannot produce genuinely optimal code, and while most standard compiler optimizations only improve code partly, a superoptimizer's goal is to find the optimal sequence, the canonical form. Superoptimizers can be used to improve conventional optimizers by highlighting missed opportunities so a human can write additional rules. ==History== The term superoptimization was coined by Alexia Massalin in the 1987 paper Superoptimizer: A Look at the Smallest Program. The label "program optimization" has been given to a field that does not aspire to optimize but only to improve. This misnomer forced Massalin to call her system a superoptimizer, which is actually an optimizer to find an optimal program. In 1992, the GNU Superoptimizer (GSO) was developed to integrate into the GNU Compiler Collection (GCC). Later work further developed and extended these ideas. ==Techniques== Traditionally, superoptimizing is performed via exhaustive brute-force search in the space of valid instruction sequences. This is a costly method, and largely impractical for general-purpose compilers. Yet, it has been shown to be useful in optimizing performance-critical inner loops. It is also possible to use a SMT solver to approach the problem, vastly improving the search efficiency (although inputs more complex than a basic block remain out of reach). In 2001, goal-directed superoptimizing was demonstrated in the Denali project by Compaq research. In 2006, answer set declarative programming was applied to superoptimization in the Total Optimisation using Answer Set Technology (TOAST) project at the University of Bath. Superoptimization can be used to automatically generate general-purpose peephole optimizers. ==Publicly available superoptimizers== Several superoptimizers are available for free download. For the x86 family of instruction sets: GNU superoptimizer (superopt) (GSO) (1992) – also supports many other ISAs STOKE, a stochastic optimizer for x86-64 x86 assembly language. For ARM: Unbounded Superoptimizer, transforming LLVM IR into ARMv7-A assembly For embedded systems: PIC microcontroller SuperOptimizer (2003) A feasibility study by Embecosm (2014) for AVR, based on GSO For the JVM: Clojure superoptimizer for the Java virtual machine (2012) For LLVM IR: souper superoptimizer for programs in the LLVM intermediate language. For WebAssembly slumps provides superoptimization for WASM programs based on souper. ==See also== Peephole optimization Dead code elimination Metacompilation ==References==

References

No reference rows published for this article.

Cite this article

MLA

"Superoptimization." encyclopegia.org, 2026, https://encyclopegia.org/wiki/superoptimization. Accessed 24 November 2026.

Chicago

"Superoptimization." encyclopegia.org. Accessed November 24, 2026. https://encyclopegia.org/wiki/superoptimization.

APA

encyclopegia.org. (2026). Superoptimization. Retrieved November 24, 2026, from https://encyclopegia.org/wiki/superoptimization

Accessed November 24, 2026 · CC BY-SA 4.0 · citation page · JSON

Related articles

Aislinn Hunter

enwiki · references available

Rosenstolz

enwiki · references available

List of battery electric vehicles

enwiki · references available

Andrej Sekera

enwiki · references available

Joint Forces Staff College

enwiki · references available

I Miss You (Darren Hayes song)

enwiki · references available
CC BY-SA 4.0 · share-alike · https://en.wikipedia.org/w/index.php?oldid=1354933104 · 0.5 · snapshot enwiki-001354933104

Cite · JSON · Search

Related services and records

Services

  • Estate — measured countries, lanes and facts
  • Intel — live corroborated events
  • Legal — statutes, cases and citations
  • Encyclopedia — articles with inline sources
  • Space — launches, satellites and orbits
  • Search — federated search and reports
  • Pass — passport account and SSO
  • Corpora — read-only corpus origins
  • e01 — self-hosted corpora and tools

Text and metadata only; each target carries its own sources. Missing data is published as no-data, never estimated.