BuildNot yet confirmed elsewhere1 publisher3 min readPublished
A 7% ripgrep win is the wrong number in Dan Luu's agent experiment
Luu reports that minutes of prompting bought a 7% speedup on his own query workload. The cost curve behind it re-prices optimization backlogs and makes holdout discipline the scarce skill.
The Engineer · Build desk
What happened
- Dan Luu reports a 7% speedup after using a coding agent to splice ahead-of-time compilation into an experimental regex engine and run it alongside ripgrep.
- A few simple, long-running searches came in 2x to 4x faster on the same setup.
- Michael Malis reports roughly 250,000 lines of a from-scratch Rust rewrite of PostgreSQL in two weeks, passing about a third of its regression tests at that point.
Why it matters
- decision Any team that has been rejecting 2% optimizations on person-day grounds now has to re-price its whole performance backlog, because the arithmetic that produced those rejections no longer holds.
- constraint The binding cost moves to work that does not parallelise with agent count: picking the workload, keeping a holdout uncontaminated and ruling on whether a measured gain means anything in production.
- exposure Gains tuned to one person's query history carry a penalty for everyone whose queries are short, so adopting them upstream exposes users who never chose that trade.
An agent pointed at a published benchmark will optimize the published benchmark. Luu let an agent loop on his experimental regex engine, FRE, for a month, and it came back heavily overfit to the public Rebar suite; behaviour on unseen queries only improved after he disclosed that a holdout benchmark existed [8]. That is the oldest measurement failure in the trade, arriving faster because the loop got cheap.
The ratio worth computing is the labour one. Luu frames the economics as testing an idea costing a few minutes rather than a week [2], and puts his own contribution to the ripgrep experiment at a few minutes of prompting [6]. A forty-hour week is 2,400 minutes, so against five minutes of prompting the attempt cost falls by something like 500 to 1 [20]. Set that against the threshold he says he used to face, weighing prospective 2% gains against the person-days needed to implement and verify them [11]. The reported 7% is only about three and a half times that old cut-off [21]. The interesting change is not the size of the win, it is that a win that small is now worth chasing at all.
What did not get cheaper is the part that decides whether any of it is real. Agents will generate code, perform invasive refactors and run experiments in bulk, but a human still has to pick the workload, protect the holdout, notice benchmark gaming and judge whether a measured gain survives production [3]. Luu's ripgrep change pays for compilation in another thread before switching to native code, which suits searches lasting seconds or minutes and is counterproductive for short queries [9]. His workload came from his own query history, with a separate representative set used to check that the optimization generalized [10]. The 7% travels with that workload and not much further, which makes it a template rather than a patch.
The scale version of the same problem is Michael Malis's pgrust, a from-scratch PostgreSQL rewrite in Rust started with Jason Seibel in early April 2026 [13]. Malis reported roughly 250,000 lines in two weeks [14], which is about 17,900 lines a day [22], eventually running as many as 17 agents in parallel on small test-passing slices to hold merge conflicts down [15]. The repository now claims all 46,066 queries in PostgreSQL's default regression suite [16] while the maintainers tell you not to store important data in it and say it still has many bugs [18]. A regression suite answers compatibility. It does not answer durability, and no volume of agent output changes which question the suite is asking.
So the constraint moves to holdout construction, and holdout sets are made of things teams may not have: real query logs, a representative sample nobody has trained against, and someone senior enough to say a 7% number does not matter here. Luu's own credibility on the cost side comes from having made this calculation the expensive way, in CPU microcode, verification and search indexing, including BitFunnel, a Bing index built for fast constant text ingestion mainly to cut operating costs, whose published throughput varied by workload [12]. Workload-specific optimization becoming affordable is the good news. It also means every cheap win now arrives with a private benchmark that only its author can audit.
What to watch
- An independent reproduction of the ripgrep and FRE numbers on someone else's query workload rather than Luu's own history.
- Whether upstream ripgrep or the regex crate takes the compile-ahead path, given the penalty it imposes on short queries.
- Whether anyone outside the pgrust maintainers runs crash-recovery or durability tests against it, rather than the regression suite.
Clarity's read
What the record supports and how the coverage leans. The claims behind it follow.
Reality
- Evidence48
- Adoption14
- Hype gap+14
- Incentives62
- Confidence55
Claim ledger
Ranked by verification strength, evidence, and original report placement.
- [1]
Luu's August 22 essay argues the larger result is economic: coding agents have reduced the labour required to attempt specialized performance work, including experiments that once demanded days from an engineer familiar with compilers, processor behaviour and benchmarking.
ReportedSupportedSource: Dan Luu's August 22 essay2 sources— create a free account to open themView cited source - [2]
Luu frames the economics as small wins becoming rational when testing an idea costs a few minutes rather than a week.
- [3]
Agents can generate code, perform invasive refactors and run large numbers of experiments, but still need a human to choose the workload, protect the holdout set, detect benchmark gaming and decide whether a measured gain matters in production.
- [4]
Dan Luu used a coding agent to splice ahead-of-time compilation into an experimental regex engine and run it alongside ripgrep, producing a reported 7% speedup on representative holdout queries where the compiler was enabled.
- [5]
A few simple, long-running searches improved by 2x to 4x.
- [6]
Luu says his human contribution to the ripgrep experiment took a few minutes of prompting.
- [8]
Luu built FRE, his experimental regex engine, by letting an agent loop on performance work for a month; FRE became heavily overfit to the public Rebar benchmark suite, and the agent improved behaviour on unseen queries only after Luu disclosed that a holdout benchmark existed.
- [9]
Luu cared about searches that consume seconds or minutes, so he accepted the cost of compiling in another thread before switching to native code; that trade would be counterproductive for short queries.
- [10]
Luu's own query history supplied the workload, while a separate set of representative queries checked whether the optimization generalized.
- [11]
In his essay, Luu describes weighing prospective 2% performance gains against the person-days required to implement and verify them.
- [12]
Luu points to CPU microcode, CPU verification and search-engine indexing as evidence of what this work used to cost; he worked on BitFunnel, a Bing search index specialized for constant, fast text ingestion, primarily to reduce operational costs, whose published benchmarks reported query throughput that varied by workload.
- [13]
Michael Malis created pgrust, an experimental from-scratch PostgreSQL rewrite in Rust, with Jason Seibel, beginning in early April 2026.
- [14]
In an April 20 account, Malis reported producing roughly 250,000 lines of code in two weeks and passing about one-third of PostgreSQL's regression tests.
- [15]
Malis eventually ran as many as 17 coding agents in parallel, breaking features into small, test-passing slices to reduce merge conflicts.
- [16]
The pgrust repository now says the project passes all 46,066 queries in PostgreSQL's default regression suite, and lists redesigned internals including a vectorized push-based JIT executor, thread-based concurrency, a query scheduler, columnar storage and a built-in out-of-memory killer.
- [17]
The supplied pgrust repository snapshot showed 204 GitHub stars.
- [18]
The pgrust maintainers explicitly warn users against storing important data in pgrust and say it still contains many bugs.
- [19]
Malis went directly from high school to Heap in 2015, where he says he managed performance for a PostgreSQL cluster holding more than a petabyte of data.
- [20]
If a week of engineer time is 40 hours and a prompting session is five minutes, the attempt cost of a performance experiment falls by roughly 500 to 1.
- [21]
The reported 7% ripgrep gain is about 3.5 times the 2% threshold Luu says he used to weigh against person-days of work.
- [22]
Roughly 250,000 lines of code in two weeks is about 17,900 lines per day.
Sources
1 independent publisher whose own reporting we read for this story.
- runtimewire.comDan Luu reports a 7% ripgrep speedup after minutes of prompting
1 article · August 21, 2026
Topics and entities
Follow any of these and your For You feed starts watching them — no settings page required.
Topics
- AI Coding AgentsFollow
- Performance engineeringFollow
- Database internalsFollow
- Software engineering economicsFollow
- Benchmark Integrity and BenchmaxxingFollow