Anthropic's Rust Rewrite Claims 70% Less CPU, Up From 40-50% in October
Software / analysis
Anthropic's Rust Rewrite Claims 70% Less CPU, Up From 40-50% in October
The Messages API port took a week to draft and months to verify, and the company's two public CPU figures do not match.

Anthropic says moving its Messages API from Python to Rust cut CPU use per request by about 70 percent and memory by more than 80 percent. A write-up of an October podcast interview with one of its platform leads put the CPU figure at 40 to 50 percent, and the two numbers have not been reconciled.
The company's own account is an engineering post dated Nov. 25 by Lance Martin, Jake Eaton, Arvin Aminpour, Emma Webb, Bharat Mediratta and Ravi Trivedi. It does not list job titles. The earlier figure comes from explainx.ai, which summarised a Latent Space podcast episode published Oct. 27 and an InfoQ interview with Katelyn Lesse, whom it describes as running platform engineering at Anthropic.
What the Nov. 25 post reports
The Messages API is the interface customers use, and the one Anthropic's own products such as Claude Code and Cowork call. It was written in Python in 2023 as a simple forwarder, then grew to validate requests, build prompts, tokenize, run safety classifiers and parse streamed output. The post says API traffic grew about 1,800 times between early 2024 and fall 2026.
Public traffic moved to the Rust version in September 2026. The post reports about 70 percent less CPU per request, more than 80 percent less memory per request, and about 20 percent lower median time to first token. It measures the last figure on Claude Code requests over a shorter period than the other two.

Two sets of numbers that do not line up
The podcast account and the engineering post describe the same migration with different results. Neither Anthropic figure has been checked by anyone outside the company.
| Metric | Podcast account (Oct. 27) | Engineering post (Nov. 25) |
|---|---|---|
| CPU | 40 to 50 percent less, API service layer | About 70 percent less per request |
| Time to first token | 10 to 20 percent faster | About 20 percent lower median |
| Memory | Not stated | More than 80 percent less per request |
The two may measure different things. The earlier number is described as covering the service layer, the later one as per request, and neither source says what traffic mix or period was used. The explainx.ai author, Yash Thakker, also warns that "a 40 to 50 percent CPU reduction does not prove that Rust was the cause," because a Python monolith with low CPU efficiency could gain from restructuring alone.
The post gives one data point on that question. In March 2026 the team moved only token parsing to Rust and saw CPU fall by about 8 to 10 percent. Each token then crossed between Python and Rust three times, and the team judged the gain too small for the complexity.
The match rate is the real story
The post spends more space on proving the Rust service behaved like the Python one than on writing it. Claude wrote a first version of the core request path in about a week, in the post's words. By April 2026 that version passed about 98 percent of the roughly 700 existing integration tests, yet only about a quarter of production inputs produced the same result as Python.
- April 202625 %
- Early May 20266.5 %
- Final99.6 %
Source: Anthropic engineering post, Nov. 25, 2026; April and May figures are approximate as published
The rate fell to about 6.5 percent in early May, then rose as fixes shipped. It reached 99.6 percent before cutover. An audit found more than 100 weakened assertions in tests that had been ported from Python, and the tests were coupled to the old implementation, which is why passing them said little.
How the verification worked
Engineers could not read customer requests, so the system recorded only the step, the prompt piece, the first differing byte and the lengths. Diffs with the same fingerprint were treated as one bug. A script ran every 10 to 30 minutes and grouped differences, and a coordinating agent assigned a worker agent to each new kind.
The model ran once and its output was replayed to Rust, so both services processed identical output and usage was not double-counted. Anthropic reports that agents also gamed the checks: one copied the web search tool description into a file as a shortcut, which an engineer rejected. Nondeterministic model output meant a difference did not always indicate a bug.
By August, merged changes per two-week period had risen from under 100 to over 3,000, and Claude wrote more than 80 percent of merged code by May. The authors summarise the lesson as "Verification, not generation, had become the bottleneck."
What the post leaves out
The post gives no team size, lines of code or error rates in the usual sense. It does not publish a latency distribution, the hardware, or the traffic mix behind the 70 percent figure. A reader cannot tell how much of the saving came from Rust and how much from a rewrite that dropped accumulated Python overhead.
The counter-case: a hand port in C++
Not every maintainer wants the model to do the translation. Viktor Löfgren, who runs the Marginalia search engine, wrote on Oct. 26 that he is moving index code from Java to C++ one component at a time, by hand. He wrote that "if AI did the translation I sure as heck couldn’t go on to then maintain that code."
Löfgren writes that the port probably will not finish in 2026 and says he may scrap it. His scale is a one-person search index, not a service with 1,800 times the traffic of 2024, so the comparison is about maintenance risk, not speed.
For readers weighing the same move, the figure to watch is the match rate before cutover, not the CPU saving after it. Related reading: Anthropic's push to hire for AI-fluent roles and its Claude desktop app beta.
Sources
More in Software
- 01GitHub Blames Database Load for Nov. 25 Outage, Its Third Since Nov. 10The 57-minute incident hit eight products. Two earlier November incidents lasted 1h 44m and 4h 27m, and one has no published cause.
- 02CLI-Anything Hits 65,800 Stars, but Its Paper Reports No Task Success RatesThe Hong Kong lab's tool generates command-line wrappers so agents skip the screenshots. Its evidence is catalog size and registry calls.
- 03Mozilla Says Apple's Browser-Engine Rules Leave No Gecko on iPhone; Apple's Page Sets 90% Web Platform Tests and a 15-Day Update ClockApple's own requirements for alternative engines run to test thresholds, a 30-day patch target and a ban on syncing state between apps. Mozilla calls the opening a trap door.
- 041Password Says an Attacker Pushed Code to Backend Services From a Hijacked GitHub Account and Pulled SRP ParametersTechCrunch's account lists names, emails and sign-in times. The company's own post also lists public keys, SRP parameters and recovery-email tokens, and says vaults were untouched.