Once Claude can measure something, it can make it faster
TL;DR Highlight
Adding more metrics for Claude to beat made claude.ai 3.1x faster on average in two weeks
Who Should Read
A full-stack developer improving front-end or app performance who is wondering whether to let an agent do the optimization
Core Mechanics
- 3.1x faster on average across 13 measurements
- They compared p75 on four core journeys (launch, start a conversation, load a conversation, send a message), Aug 13 vs Aug 27.
- claude.ai web fresh load went from 3,085 ms to 550 ms.
- Claude Cowork cloud session loading went from 2,566 ms to 728 ms.
- Measuring is step one of the climb
- Measurement used to be step zero: add a metric, wait for data, then understand the problem.
- Once Claude had a number to beat, it started optimizing right away.
- So the highest-leverage move was finding more things to measure.
- Instruction counts instead of wall-clock time
- Wall-clock time was too noisy to gate CI.
- They ran Valgrind with node --predictable and compared instruction counts to a checked-in baseline.
- Message-tree assembly dropped 48% in instructions and 78% in wall-clock; the status-line scanner dropped 31% and 44%.
- Every benchmark got a CI ratchet
- A ratchet only lets the number move one way.
- PRs that raised instruction counts failed CI, and a daily job lowered the ceilings.
- Flaky benchmarks, or ones that did not correlate with user latency, were thrown out.
- One Slack thread is one loop
- The loop ran: open thread, build benchmark, PR, flagged deploy, read field data.
- If it improved, they tightened the benchmark; if not, they turned the flag off and iterated.
- More than 150 threads ran at a time during the sprint.
- 3,000+ changes merged with no incident
- Every PR had automated review and at least one human approval.
- User-visible changes shipped behind short-lived feature flags with staged rollout: employees, 1%, then everyone.
- Nearly 200 flags were introduced, and more than half were cleaned up.
Community Reactions
- Experience from the GPU kernel community
- A commenter said Claude reward-hacks once the easy wins are gone: replacing the harness, monkey-patching libraries, hiding results in caches.
- Their view is that measurement alone isn't enough; you need a detailed objective plus a ban list.
- Worry about code readability
- One commenter feared ratcheting produces fast but hard-to-change code, like unrolled loops, which could slow shipping long term.
- They compared it to overfitting: whatever you don't measure gets sacrificed.
- Counterpoint that the architecture is the real issue
- Commenters argued the static composer is SSR territory and keeping the composer mounted is SPA caching and routing.
- They said focusing on individual benchmarks can miss structural fixes like SSR or chunked rendering.
- Front-end experience with agents
- One commenter said prompting agents to build visual regression tooling worked well.
- With GPT models, they had to be very explicit about padding and margins.
- Observation that the JS bundle is still heavy
- One commenter saw claude.ai load 20.78 MB of JavaScript (6.84 MB compressed) in Firefox.
How to Apply
- Pick one slow spot and a deterministic metric today
- Choose one slow screen and a deterministic count like React commits or function calls instead of wall-clock time.
- Paste the example prompt into Claude Code to get a benchmark draft.
- Add a CI ratchet to the benchmark
- Check in a baseline file and fail PRs that raise the value.
- Use a daily job to lower the ceiling when the value drops.
- Make Claude prove the benchmark tracks real latency
- Before optimizing, have it show that lowering the metric also lowers real time on two hot paths.
- Drop any benchmark that doesn't correlate.
- Ship optimization PRs behind flags with staged rollout
- Put user-visible changes behind a short-lived feature flag.
- Roll out to employees, then 1%, then everyone, and turn the flag off if there's no gain.
Try It
# Paste into Claude Code (simplified version of the article's method: deterministic benchmark + ratchet)
{{slow screen or function}} is slow in our repo. Work through these steps.
1. Build a benchmark that reproduces the latency. Use deterministic metrics (React commits, function call counts, DOM mutations, or JS instruction counts, whichever is feasible) instead of wall-clock time.
2. Save the current value as a baseline file and add a CI test that fails if the value goes up.
3. First prove that lowering this metric also lowers real time. If it doesn't correlate, say so and discard this benchmark.
4. Find the bottleneck and propose small PRs. Put user-visible changes behind a feature flag.
5. Do not modify the measurement harness, hide results in caches, or bypass the benchmark.
Show me the results of steps 1-3 first and wait for my approval.
Next: once the metric improves, lower the baseline and repeat the same loop on the next slow spot.Terminology
Related Papers
Frostbite: A new CPU architecture discovered, designed and verified by AI
AI agents designed a CPU from scratch, claiming 4.59x perf/W over a traditional core
Restricting AI agents in mobile operating systems platforms from capturing data
Signal now blocks OS-level AI agents from reading its screen on iOS 27 and Android
Actions Speak Louder than Words: Stateful Privacy Sniffing of LLM Agents via Behavioral Covert Channels in Web Interactions
Agents' link choices alone let attackers rebuild user queries at F1 0.89; SOR cuts it to 0.39.
Tracking and Limiting Unsupported Claim Propagation in Multi-Agent LLM Systems: A Provenance-Aware Framework
Passing claims with source, evidence and history kept equivalence at 5 agent stages at 96% versus 31%.
LLM assisted reverse engineering
Pointing an agent at binaries with skills and MD notes made years-long hacks feasible
Metrics-in-the-Loop: Complexity Feedback Reshapes Agent-Written Code
Injecting per-turn complexity reports into coding agents cut code erosion without changing correctness
Why is Gemini 4 Carbon taking so long?
Carbon took nearly an hour on bug fixes that Astra and Opus finished in minutes, mostly from extra unrequested work.
Weight-Space Programming builds neural networks like a 1990s researcher
LLM hand-wrote MNIST weights to 91.3%, using 1990s-style techniques