Stochastic superoptimization
The DOI matches its Crossref record; 19 of the 19 references it cites were found in a registry or an index.
Abstract
We formulate the loop-free binary superoptimization task as a stochastic search problem. The competing constraints of transformation correctness and performance improvement are encoded as terms in a cost function, and a Markov Chain Monte Carlo sampler is used to rapidly explore the space of all possible programs to find one that is an optimization of a given target program. Although our method sacrifices completeness, the scope of programs we are able to consider, and the resulting quality of the programs that we produce, far exceed those of existing superoptimizers. Beginning from binaries compiled by llvm -O0 for 64-bit x86, our prototype implementation, STOKE, is able to produce programs which either match or outperform the code produced by gcc -O3, icc -O3, and in some cases, expert handwritten assembly.
Overview
The claims and statistics of this paper haven’t been checked yet.
Free: it reads the open-access text and checks the first 5 claims that cite a source we can check. Create a free account to check every claim.
Integrity signals
Registry
Cites
Statistics
Verification
Claims the paper makes
The claims and statistics of this paper haven’t been checked yet.
Free: it reads the open-access text and checks the first 5 claims that cite a source we can check. Create a free account to check every claim.
Self-check
Percentages, sums and reported differences re-computed from the paper’s own numbers.
The self-check needs the paper’s full text.
Citations
Cites
Equation of State Calculations by Fast Computing Machines
Metropolis, N., Rosenbluth, A. W., Rosenbluth, M. N., Teller, A. H., & Teller, E. (1953) · The Journal of Chemical Physics · doi:10.1063/1.1699114 · Cited by 37,192
Monte Carlo sampling methods using Markov chains and their applications.
Hastings, W. K. (1970) · Biometrika · doi:10.1093/biomet/57.1.97 · Cited by 15,195 · cited 1×
“Although computing Z is in general intractable, the MetropolisHastings algorithm for generating Markov chains is designed to explore density functions such as p(·) without the need to compute the partition function [10, 15].”
MethodKLEE: unassisted and automatic generation of high-coverage tests for complex systems programs
Cadar, C., Dunbar, D., & Engler, D. (2008) · doi:10.5555/1855741.1855756 · Cited by 2,620
An introduction to MCMC for machine learning.
Andrieu, C., de Freitas, N., Doucet, A., & Jordan, M. I. (2003) · Machine Learning · doi:10.1023/a:1020281327116 · Cited by 2,451
Pin: building customized program analysis tools with dynamic instrumentation
Luk, C.-K., Cohn, R., Muth, R., Patil, H., Klauser, A., Lowney, G., Wallace, S., Reddi, V. J., & Hazelwood, K. (2005) · Proceedings of the 2005 ACM SIGPLAN conference on Programming language design and implementation · doi:10.1145/1065010.1065034 · Cited by 2,310
An updated set of basic linear algebra subprograms (BLAS)
(2002) · ACM Transactions on Mathematical Software · doi:10.1145/567806.567807 · Cited by 834
Combinatorial sketching for finite programs
Solar-Lezama, A., Tancau, L., Bodik, R., Seshia, S., & Saraswat, V. (2006) · Proceedings of the 12th international conference on Architectural support for programming languages and operating systems · doi:10.1145/1168857.1168907 · Cited by 635
A Decision Procedure for Bit-Vectors and Arrays
Ganesh, V., & Dill, D. L. (2007) · Lecture Notes in Computer Science · doi:10.1007/978-3-540-73368-3_52 · Cited by 585
Veach, E., & Guibas, L. J. (1997) · Proceedings of the 24th annual conference on Computer graphics and interactive techniques - SIGGRAPH '97 · doi:10.1145/258734.258775 · Cited by 511
The Markov chain Monte Carlo revolution
Diaconis, P. (2008) · Bulletin of the American Mathematical Society · doi:10.1090/s0273-0979-08-01238-x · Cited by 295
Cited by
Alur, R., Bodik, R., Juniwal, G., Martin, M. M. K., Raghothaman, M., Seshia, S. A., Singh, R., Solar-Lezama, A., Torlak, E., & Udupa, A. (2013) · 2013 Formal Methods in Computer-Aided Design · doi:10.1109/fmcad.2013.6679385 · Cited by 656
Guided, stochastic model-based GUI testing of Android apps
Su, T., Meng, G., Chen, Y., Wu, K., Yang, W., Yao, Y., Pu, G., Liu, Y., & Su, Z. (2017) · Proceedings of the 2017 11th Joint Meeting on Foundations of Software Engineering · doi:10.1145/3106237.3106298 · Cited by 371
FlashMeta: a framework for inductive program synthesis
Polozov, O., & Gulwani, S. (2015) · Proceedings of the 2015 ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications · doi:10.1145/2814270.2814310 · Cited by 225
“In particular, the participants of the SyGuS-COMP 2014 competition employed: SMT-based search [13], enumerative search [37], sketching [35], and stochastic search [31].”
MethodSynthesizing highly expressive SQL queries from input-output examples
Wang, C., Cheung, A., & Bodik, R. (2017) · Proceedings of the 38th ACM SIGPLAN Conference on Programming Language Design and Implementation · doi:10.1145/3062341.3062365 · Cited by 178
“Program Synthesis Algorithms Inductive program synthesis algorithms [2, 3, 11] can be roughly classified into the following five categories: (1) enumerative search algorithms [10, 18, 24, 25, 37], (2) constraint-solver aided synthesis [34, 35], (3) type-directed synthesis [9, 23], (4) version space algebra based infer…”
BackgroundSPoC: Search-based Pseudocode to Code
Kulal, S., Pasupat, P., Chandra, K., Lee, M., Padon, O., Aiken, A., & Liang, P. (2019) · arXiv · doi:10.48550/arxiv.1906.04908 · Cited by 103
“For other problems, brute force enumeration of programs (with some optimization) works surprisingly well [26, 3], but when the search space is too large for enumeration, randomized search guided by a cost function can be effective [30].”
BackgroundSelf-citationSemantic program alignment for equivalence checking
Churchill, B., Padon, O., Sharma, R., & Aiken, A. (2019) · Proceedings of the 40th ACM SIGPLAN Conference on Programming Language Design and Implementation · doi:10.1145/3314221.3314596 · Cited by 97
“Equivalence checking, the problem of formally proving that two functions or programs are semantically equivalent, is a long-standing and important problem; applications include verification of compiler correctness [26], superoptimization [3, 6], program synthesis [29], and verifying the correctness of code refactoring…”
BackgroundSelf-citationExploring the Learnability of Program Synthesizers by Novice Programmers
Jayagopal, D., Lubin, J., & Chasins, S. E. (2022) · Proceedings of the 35th Annual ACM Symposium on User Interface Software and Technology · doi:10.1145/3526113.3545659 · Cited by 40
Learning Performance-Improving Code Edits
Shypula, A., Madaan, A., Zeng, Y., Alon, U., Gardner, J., Hashemi, M., Neubig, G., Ranganathan, P., Bastani, O., & Yazdanbakhsh, A. (2023) · arXiv · doi:10.48550/arxiv.2302.07867 · Cited by 146
Wang, Y., Wang, X., & Dillig, I. (2018) · Proceedings of the ACM on Programming Languages · doi:10.1145/3276525 · Cited by 17
“…constraint solving [So and Oh 2017; Solar-Lezama 2009], enumerative search [Alur et al. 2017; Feser et al. 2015], version space learning [Polozov and Gulwani 2015], stochastic search [Heule et al. 2016; Schkufza et al. 2013], and statistical models and machine learning [Raychev et al. 2016, 2015].”
BackgroundAlphaEvolve: A coding agent for scientific and algorithmic discovery
Novikov, A., Vũ, N., Eisenberger, M., Dupont, E., Huang, P.-S., Wagner, A. Z., Shirobokov, S., Kozlovskii, B., Ruiz, F. J. R., Mehrabian, A., et al. (2025) · arXiv · doi:10.48550/arxiv.2506.13131 · Cited by 15
“The idea of code superoptimization goes back to the 1980s [69]; pre-LLM approaches to the problem included systematic enumeration [69], genetic search [20], Monte Carlo sampling [86], and deep reinforcement learning [68].”
Metadata
- Authors
- Schkufza, E., Sharma, R., & Aiken, A.
- Venue
- Proceedings of the eighteenth international conference on Architectural support for programming languages and operating systems
- Publisher
- ACM
- Published
- 2013-03-16
- Pages
- 305-316
- OpenAlex
- W2294628582
- Cited by
- 269
- References
- 19
- FWCI
- 16.61
- Type
- conference paper
- Language
- en
- Open access
- closed
About these checks
Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.
Statistics and arithmetic are recomputed, not judged.
Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.
What counts as a claim ›How we measure confidence ›How we check this ›
Are you an author, or do you see a problem with this page? Request a review
Data sources
Bibliographic data: Semantic Scholar, OpenAlex, Crossref.
Contains information from the Semantic Scholar Academic Graph Datasets, made available under the ODC Attribution License (ODC-BY 1.0).
Semantic Scholar’s data is described in: Kinney, R., et al. (2023). The Semantic Scholar Open Data Platform. arXiv:2301.10140.