Rewrite System Showdown: Stochastic Search vs. EqSat
Pith reviewed 2026-05-25 05:57 UTC · model grok-4.3
The pith
Equality saturation using e-graphs is compared directly to stochastic search on five benchmarks to test whether it is actually good.
A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.
Core claim
The paper performs a direct comparison of equality saturation and stochastic search across five benchmarks in order to answer whether e-graphs are actually good for equational program optimization.
What carries the argument
Head-to-head evaluation of equality saturation (EqSat) versus stochastic search on five shared benchmarks.
Load-bearing premise
The five chosen benchmarks are representative of the practical workloads where equational optimization matters.
What would settle it
Running the same two methods on a sixth benchmark that produces a clear and consistent winner absent from the original five would show the comparison does not yet settle the general question.
Figures
read the original abstract
Equality saturation has become a dominant paradigm for equational program optimization. However, it has never been rigorously compared to another approach to the same problem, even though several exist, the most notable being stochastic search. In this paper, we compare equality saturation to stochastic search over five benchmarks to answer the question: are e-graphs actually good?
Editorial analysis
A structured set of objections, weighed in public.
Referee Report
Summary. The paper claims that equality saturation (EqSat) has become the dominant paradigm for equational program optimization yet has never been rigorously compared to stochastic search. It performs an empirical comparison of the two approaches across five benchmarks to determine whether e-graphs are actually good.
Significance. If the comparison is methodologically sound and the benchmarks representative, the work would fill a notable gap by providing the first direct head-to-head evaluation of EqSat versus stochastic search, offering empirical guidance on when e-graphs are preferable in rewrite-based optimization.
major comments (1)
- [§4 and abstract] The central claim that the five-benchmark comparison suffices to answer whether e-graphs are good requires the benchmarks to be representative of practical equational-optimization workloads. No selection criteria, diversity metrics, or mapping to real compiler/optimizer use cases are provided (see §4 and the abstract). This is load-bearing for the headline conclusion.
minor comments (1)
- [Abstract] The abstract contains no mention of methodology, metrics, statistical tests, or results, which is atypical for an empirical comparison paper and hinders quick assessment of the contribution.
Simulated Author's Rebuttal
We thank the referee for highlighting the importance of benchmark representativeness for our central claim. We address this point below and will revise the manuscript to strengthen the presentation.
read point-by-point responses
-
Referee: [§4 and abstract] The central claim that the five-benchmark comparison suffices to answer whether e-graphs are good requires the benchmarks to be representative of practical equational-optimization workloads. No selection criteria, diversity metrics, or mapping to real compiler/optimizer use cases are provided (see §4 and the abstract). This is load-bearing for the headline conclusion.
Authors: We agree that explicit justification for benchmark selection is necessary to support the headline conclusion. The current manuscript presents the five benchmarks without detailing selection criteria, diversity metrics, or explicit mappings to real-world compiler workloads. In revision we will add a dedicated subsection in §4 that (1) states the criteria used to choose the benchmarks (coverage of distinct rewrite domains drawn from prior EqSat and stochastic-search literature), (2) reports simple diversity metrics (e.g., number of rules, expression sizes, and optimization objectives), and (3) discusses the extent to which each benchmark corresponds to documented use cases in production compilers. We will also adjust the abstract wording to reflect that the comparison provides evidence on the five chosen workloads rather than a universal claim. These changes directly address the load-bearing concern. revision: yes
Circularity Check
No derivation chain present; empirical comparison only
full rationale
The paper reports an empirical head-to-head evaluation of equality saturation versus stochastic search on five benchmarks. No equations, first-principles derivations, fitted parameters, or predictive claims appear in the abstract or stated methodology. The result is a direct experimental outcome rather than any reduction of a claimed prediction to its own inputs. Consequently the circularity patterns (self-definitional, fitted-input-called-prediction, self-citation load-bearing, etc.) have no purchase.
Axiom & Free-Parameter Ledger
Reference graph
Works this paper leans on
-
[1]
Russel Arbore, Alvin Cheung, and Max Willsey. 2025. Optimism in Equality Saturation.arXiv preprint arXiv:2511.20782(2025)
work page internal anchor Pith review Pith/arXiv arXiv 2025
-
[2]
Anonymous Authors. 2025. Better E-Graphs for Imperative Programs (This ICFP Submission)
work page 2025
-
[3]
Yaohui Cai, Kaixin Yang, Chenhui Deng, Cunxi Yu, and Zhiru Zhang
-
[4]
SmoothE: Differentiable E-Graph Extraction. InProceedings of the 30th ACM International Conference on Architectural Support for Programming Languages and Operating Systems, Volume 1(Rotterdam, Netherlands)(ASPLOS ’25). Association for Computing Machinery, New York, NY, USA, 1020–1034. doi:10.1145/3669940.3707262
-
[5]
Alessandro Cheli. 2021. Metatheory.jl: Fast and Elegant Algebraic Computation in Julia with Extensible Equality Saturation.Journal of Rewrite System Showdown: Stochastic Search vs. EqSat EGRAPHS ’26, June 15, 2026, Boulder, CO, USA Open Source Software6, 59 (2021), 3078. doi:10.21105/joss.03078
-
[6]
Chen Chen, Guangyu Hu, Dongsheng Zuo, Cunxi Yu, Yuzhe Ma, and Hongce Zhang. 2024. E-Syn: E-Graph Rewriting with Technology- Aware Cost Functions for Logic Synthesis. InProceedings of the 61st ACM/IEEE Design Automation Conference(San Francisco, CA, USA) (DAC ’24). Association for Computing Machinery, New York, NY, USA, Article 124, 6 pages. doi:10.1145/36...
-
[7]
Constantinides, and Theo Drane
Samuel Coward, George A. Constantinides, and Theo Drane. 2023. Combining E-Graphs with Abstract Interpretation. InProceedings of the 12th ACM SIGPLAN International Workshop on the State Of the Art in Program Analysis(Orlando, FL, USA)(SOAP 2023). Association for Computing Machinery, New York, NY, USA, 1–7. doi:10.1145/3589250. 3596144
-
[8]
Persi Diaconis. 2009. The Markov Chain Monte Carlo Revolution.Bull. Amer. Math. Soc.46, 2 (2009), 179–205. doi:10.1090/S0273-0979-08- 01238-X
-
[9]
David Eppstein and Daniel Frishberg. 2023. Improved Mixing for the Convex Polygon Triangulation Flip Walk. In50th International Collo- quium on Automata, Languages, and Programming (ICALP 2023) (Leib- niz International Proceedings in Informatics (LIPIcs), Vol. 261), Kousha Etessami, Uriel Feige, and Gabriele Puppis (Eds.). Schloss Dagstuhl – Leibniz-Zentr...
-
[10]
Kiran Gopinathan. 2025. Ego: An Extensible E-Graph Library for OCaml.https://github.com/verse-lab/ego. Accessed: 2026-04-06
work page 2025
-
[11]
Stefan Heule, Eric Schkufza, Rahul Sharma, and Alex Aiken. 2016. Stratified synthesis: automatically learning the x86-64 instruction set. SIGPLAN Not.51, 6 (June 2016), 237–250. doi:10.1145/2980983.2908121
-
[12]
Qiantan Hong and Alex Aiken. 2024. Recursive Program Synthesis using Paramorphisms.Proc. ACM Program. Lang.8, PLDI, Article 151 (June 2024), 24 pages. doi:10.1145/3656381
-
[13]
Zhihao Jia, Oded Padon, James Thomas, Todd Warszawski, Matei Za- haria, and Alex Aiken. 2019. TASO: optimizing deep learning computa- tion with automatic generation of graph substitutions. InProceedings of the 27th ACM Symposium on Operating Systems Principles(Huntsville, Ontario, Canada)(SOSP ’19). Association for Computing Machinery, New York, NY, USA, ...
-
[14]
Jason R Koenig, Oded Padon, and Alex Aiken. 2021. Adaptive restarts for stochastic synthesis. InProceedings of the 42nd ACM SIGPLAN International Conference on Programming Language Design and Imple- mentation. 696–709
work page 2021
-
[15]
Smail Kourta, Adel Abderahmane Namani, Fatima Benbouzid-Si Tayeb, Kim Hazelwood, Chris Cummins, Hugh Leather, and Riyadh Baghdadi
-
[16]
Caviar: an e-graph based TRS for automatic code optimization. InProceedings of the 31st ACM SIGPLAN International Conference on Compiler Construction(Seoul, South Korea)(CC 2022). Association for Computing Machinery, New York, NY, USA, 54–64. doi:10.1145/ 3497776.3517781
-
[17]
Thomas Kundefinedhler, Andrés Goens, Siddharth Bhat, Tobias Grosser, Phil Trinder, and Michel Steuwer. 2024. Guided Equality Saturation.Proc. ACM Program. Lang.8, POPL, Article 58 (Jan. 2024), 32 pages. doi:10.1145/3632900
-
[18]
Rodrigo Mesquita. 2022. hegg: Fast Equality Saturation in Haskell. https://hackage.haskell.org/package/hegg. Hackage package, BSD-3- Clause license. Accessed: 2026-04-06
work page 2022
-
[19]
Wilcox, Eva Darulova, Dan Grossman, and Zachary Tatlock
Chandrakana Nandi, Max Willsey, Adam Anderson, James R. Wilcox, Eva Darulova, Dan Grossman, and Zachary Tatlock. 2020. Synthe- sizing Structured CAD Models with Equality Saturation and Inverse Transformations. InProceedings of the 41st ACM SIGPLAN Conference on Programming Language Design and Implementation(London, UK) (PLDI 2020). Association for Computi...
-
[20]
Pavel Panchekha, Alex Sanchez-Stern, James R. Wilcox, and Zachary Tatlock. 2015. Automatically Improving Accuracy for Floating Point Expressions.SIGPLAN Not.50, 6 (June 2015), 1–11. doi:10.1145/2813885. 2737959
-
[21]
Eric Schkufza, Rahul Sharma, and Alex Aiken. 2013. Stochastic super- optimization. InProceedings of the Eighteenth International Conference on Architectural Support for Programming Languages and Operating Sys- tems(Houston, Texas, USA)(ASPLOS ’13). Association for Computing Machinery, New York, NY, USA, 305–316. doi:10.1145/2451116.2451150
-
[22]
Eric Schkufza, Rahul Sharma, and Alex Aiken. 2014. Stochastic opti- mization of floating-point programs with tunable precision.SIGPLAN Not.49, 6 (June 2014), 53–64. doi:10.1145/2666356.2594302
- [23]
-
[24]
Stan Seibert Siu Kwan Lam, Stuart Archibald. 2025. Numba v2: Towards a SuperOptimizing Python Compiler. InProceedings of the Python in Science Conference (SciPy). fncj2446. doi:10.25080/fncj2446
-
[25]
Rupanshu Soi, Benjamin Driscoll, Ke Wang, and Alex Aiken. 2025. Incremental Equality Saturation. InEGRAPHS. Seoul, South Korea. https://rupanshusoi.github.io/pdfs/egraphs-25.pdf
work page 2025
- [26]
-
[28]
Jonathan Van der Cruysse, Abd-El-Aziz Zayed, Mai Jacob Peng, and Christophe Dubach. 2026. Parallel and Customizable Equality Satu- ration. InProceedings of the 35th ACM SIGPLAN International Con- ference on Compiler Construction(Sydney, NSW, Australia)(CC ’26). Association for Computing Machinery, New York, NY, USA, 94–105. doi:10.1145/3771775.3786266
-
[29]
Max Willsey, Chandrakana Nandi, Yisu Remy Wang, Oliver Flatt, Zachary Tatlock, and Pavel Panchekha. 2021. egg: Fast and exten- sible equality saturation.Proc. ACM Program. Lang.5, POPL, Article 23 (jan 2021), 29 pages. doi:10.1145/3434304
- [30]
-
[31]
Yihong Zhang, Derek Gerstmann, Andrew Adams, and Maaz Bin Safeer Ahmad. 2026. Pushing Tensor Accelerators beyond MatMul in a User-Schedulable Language. In2026 IEEE/ACM International Symposium on Code Generation and Optimization (CGO). 242–254. doi:10.1109/CGO68049.2026.11395214
-
[32]
Yihong Zhang, Yisu Remy Wang, Oliver Flatt, David Cao, Philip Zucker, Eli Rosenthal, Zachary Tatlock, and Max Willsey. 2023. Better Together: Unifying Datalog and Equality Saturation.Proc. ACM Program. Lang. 7, PLDI, Article 125 (jun 2023), 25 pages. doi:10.1145/3591239
- [33]
discussion (0)
Sign in with ORCID, Apple, or X to comment. Anyone can read and Pith papers without signing in.