How claude.ai got 3x faster: gate CI on counts, not milliseconds
Anthropic made claude.ai about 3x faster and protected the wins by failing CI on deterministic counts instead of noisy wall-clock milliseconds.

One em dash in a reply could freeze claude.ai for about a second.
Anthropic's web team published how they made claude.ai and the desktop app about 3x faster in two weeks. Claude did most of the performance work from one Slack channel, and engineers approved every change.
The em dash bug is my favorite. Any character outside Latin-1 made V8 store the whole reply as UTF-16, so every syntax-highlighting regex ran on its slower two-byte path. The fix was about twenty lines: copy each code block into a one-byte string before highlighting.
The bigger lesson is how they protected the wins. Wall-clock milliseconds were too noisy for CI, so they gated deterministic counts that can only ratchet down:
- JS instruction counts on hot paths
- React commits per interaction
- Style recalculations and DOM mutations
- Layout shifts per named region
A PR that raises one fails CI.
Milliseconds are for dashboards. Counts are for CI.



Notes on this post
Join in
Leave a comment.
Sign in to add your note to this post.
Only your name and avatar are used.