Skip to content

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

How we use AISend a correction

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
Why these scores

Claim ledger

Ranked by verification strength, evidence, and original report placement.

  1. [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. [2]

    Luu frames the economics as small wins becoming rational when testing an idea costs a few minutes rather than a week.

  3. [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.

Sources

1 independent publisher whose own reporting we read for this story.

  1. runtimewire.com

    1 article · August 21, 2026

    Dan Luu reports a 7% ripgrep speedup after minutes of prompting

Share your take

Let Clarity write the post for you.

Signed-in readers get a short post drafted on this story in the register they choose — narrative, analytical, or a direct position — editable to the last word before it goes anywhere. The share buttons at the top of this story work without an account.

Topics and entities

Follow any of these and your For You feed starts watching them — no settings page required.

Topics

Loading related stories