Back to feed
News Story
InfoQ
1 sources

Rails creator DHH uses AI agents to rewrite Campfire in Rust, claims 150x speedup

At Rails World 2026, Ruby on Rails creator DHH announced he has stopped writing code by hand and is using AI agents to rewrite 37signals' Campfire and HEY backend in Rust. His benchmark shows the Rust version of Campfire handling 36,260 requests per second for chat room page loads, about 150 times faster than Rails. The move has sparked community scrutiny over his testing methodology and code quality.

SynthePulse Insight · AI deep reading

Rust 150x Faster? Why DHH's Campfire Test Was Overturned by Developers Digging Through the Code

Version 1 · 1 source

Rails creator DHH announced at Rails World 2026 that 37signals is pivoting to rewriting products in Rust with Agents, and used a multilingual Campfire rewrite test to claim Rust is about 150 times faster than Rails. After developers dug through the public repositories, they found the language versions were not equivalent in commit counts, optimization investment, and task requirements. The focus of the controversy shifted from "Is Rust faster?" to "Are performance comparisons fair in the Agent era, and do humans still need to understand code?"

  • At Rails World 2026, DHH called Rust "the ugliest programming language invented in the past 40 years," but said that if he never has to look at the code and can just enjoy an app that is 30 or even 100 times faster, he loves Rust.
  • DHH had Agents rewrite Campfire into Elixir, Go, and Rust versions and compared them with the original Rails version, claiming Rust reached 36,260 requests per second, about 150 times Rails, 50 times Elixir, and 9.4 times Go.
  • Developers dug through the public repositories and found that as of October 6, the Rust version's main branch had 398 commits, while Elixir and Go each had only 3.
  • The AGENTS.md task requirements differed across the three versions: Rust was allowed to deviate from the Rails implementation and pursue speed, while Elixir and Go were required to preserve the reference implementation's behavior, and neither was given a performance number they had to beat.
  • Google engineer Jaana Dogan said what truly worried her about the future of programming was that after seeing such results, people did not immediately realize something must be wrong with the test results or what was actually being measured.
  • DHH responded that he did not interfere with the specific Elixir implementation, only asked two frontier Agents to maximize Elixir's performance as much as possible, and said that if frontier Agents cannot find the "magic switch" to make a program run faster, that cannot count as a point in Elixir's favor.
Open section navigationFrom "Ugliest Language" to "I Love Rust": DHH's Turn

From "Ugliest Language" to "I Love Rust": DHH's Turn

At Rails World 2026 in late September 2026, Ruby on Rails creator DHH called Rust "the ugliest programming language invented in the past 40 years." But a few sentences later he pivoted: if he never has to look at the code and only needs to enjoy an app that is 30 or even 100 times faster, he loves Rust.

Behind this seemingly contradictory attitude is a more fundamental shift. At the conference, DHH said he stopped writing code by hand about four months ago, and claimed that writing code by hand is no longer an economically productive activity.

He also announced that the next-generation email service HEY will no longer be centered on a web app, but will develop native clients for major operating systems separately, and the backend will also pivot to Rust and be rewritten as a purer mail server. DHH's preliminary figures for the new HEY backend were a 99% reduction in CPU usage, a 95% reduction in memory usage, and the server count could be reduced to ten machines kept mainly for redundancy; the team roughly estimated that a single Raspberry Pi might even handle the entire peak load.

The Campfire Test: The Claim That Rust Is 150 Times Faster

Two weeks later, DHH used a performance chart to further prove his point. He had Agents rewrite 37signals' group chat app Campfire into Elixir, Go, and Rust versions, then compared them with the original Ruby on Rails version.

In just the test of loading the chat room page, Rust reached 36,260 requests per second. In the test DHH published, the Rust version was about 150 times Rails, 50 times Elixir, and 9.4 times Go, and performed well across all five workloads.

These numbers come from tests and tweets published by DHH himself; they are self-reported and not independently verified by a third party. The article says that rewriting applications in Rust now seems to be a popular move, with Microsoft's Copilot runtime, the pnpm JavaScript installer, and the Bun JavaScript toolchain all adopting Rust for rewrites.

Developers Dig Through the Code: 398 Commits vs. 3 Commits

DHH's tweet approached nearly 1 million views, but developers did not follow his line of thinking about whether Rust should be chosen again in the Agent era. Many people's first reaction was: this set of results is obviously wrong, and the versions very likely did not start from the same starting line.

Jared Smith examined the complete records of the three public repositories. As of October 6, the Rust version's main branch already had 398 commits, while Elixir and Go each had only 3. Of Rust's 398 commits, 380 came from DHH, 10 from Abdelkader Boudih, and 8 from Daniel Collin, with 397 of them concentrated between September 26 and October 1.

The Elixir repository had only one porting commit and two documentation commits; the Go repository contained one port, one performance optimization, and one README update. The Rust repository also had 44 PRs, 39 of which had been merged. Based on titles, 16 of the merged PRs were explicitly performance-related, and two more performance PRs had not yet been merged. The optimizations included indexing messages by room and time, caching every part of the page, using a dedicated thread to read the database, and calling ARMv8 SHA-256 instructions to perform hash calculations.

This means the Rust version went through far more than a single Agent rewrite. Over six days it continuously received new performance targets and repeatedly went through testing, bottleneck discovery, code changes, and retesting. Elixir and Go basically remained at the first version delivered by the Agent.

Unequal Task Requirements: The Key Differences in AGENTS.md

The task requirements the Agents received from the start were also different. The Rust version's AGENTS.md explicitly told the Agent: "If doing so makes the app faster or better, you may now deviate from the Rails implementation." It also required every performance change to provide before-and-after measurement data.

The Elixir version's main requirement was to "preserve the behavior of the pinned Rails reference implementation." The Go version used the already-tuned Rust app as a reference and required preserving the Rust app's behavior. Neither Elixir nor Go was given a performance number it had to beat, nor were they allowed to abandon consistency with the reference implementation for speed.

The Rust Agent received a continuous optimization task, while the Elixir Agent mainly received a feature porting task. When the versions were finally put into the same performance table, what was being compared was no longer just the programming languages.

The Elixir Implementation Called "Utterly Stupid" and the Reversal After Rewriting

One Elixir developer directly called the implementation "utterly stupid." He pointed out that the Agent handed all SQL queries to the same GenServer and waited for results through synchronous GenServer.call, effectively making database queries that could have run concurrently queue up and complete one by one, actively throwing away Elixir/BEAM's concurrency advantage.

Several other people directly rewrote the Elixir code, bringing its performance to a level comparable to Rust. After the rewrite, the Elixir version even outperformed Rust on some tasks, although a third party later made further optimizations to the Rust version.

Google engineer Jaana Dogan's response spread the most widely, saying what truly worried her about the future of programming was that after seeing such results, people did not immediately realize something must be wrong with the test results or what was actually being measured.

DHH's Response and the Two Sides' Divergent Understandings of the Test's Purpose

After the controversy arose, DHH still stuck to his core judgment. He said speed is not the only factor to consider when measuring a codebase, and Rust also has drawbacks such as slow compilation, but when Agents write code and verify output, we clearly need to adapt to a new reality.

Regarding the criticism that database concurrent reads were prohibited in the Elixir version, DHH responded that he did not interfere with the specific implementation, only asked two frontier Agents to maximize Elixir's performance as much as possible, and this code was the final result. He welcomed developers to submit PRs to improve speed, while emphasizing: if frontier Agents cannot find those magic switches that make a program "run faster," that cannot count as a point in Elixir's favor.

This response also exposed the two sides' different understandings of this test. Elixir developers believe the test cannot reflect the true level of the two languages. But DHH was focused on another thing: under the same task, if the code is handed to the current strongest Agents, can they find on their own the correct way to write a language and the way to optimize its performance?

Conclusion: You Can Avoid Writing Code, But You Cannot Avoid Understanding Code

When Agents take on most coding work, whether a language is easy to write and whether code is pleasing to the eye may indeed no longer matter as much as before. This happens to touch on what DHH called "no longer reading code in the future."

But if the standards are written incompletely, the Agent may still deliver a functionally correct but poorly performing version; if the comparison conditions themselves are unfair, even precise numbers can mislead. DHH wanted to use Campfire to prove that after humans stop looking at code, they can bypass Rust's terrible development experience and directly enjoy its performance dividends. Yet the comment section turned the repositories upside down and found another conclusion: you can avoid writing code, but you cannot avoid understanding code. What to have the Agent do, whether it did it correctly, and whether this comparison is fair ultimately still have to be judged by humans.

Credibility boundary

This article is based on an InfoQ report (article_id 21151). The Campfire and HEY performance numbers published by DHH all come from tests and tweets he published himself; they are self-reported, have not been independently reproduced by a third party, and their real comparability is questionable. To what extent the gap between the continuous performance optimization the Rust version received over six days and the one-time delivery of Elixir and Go explains the 150x gap was not given a quantitative conclusion by the source. After Elixir developers rewrote it, performance reached or even partly exceeded Rust, but a third party subsequently optimized the Rust version again, and the final comparison result was not given in the source. DHH and the Elixir developers understand the purpose of the test differently, and the source did not adjudicate who is right or wrong. The article's conclusion "you can avoid writing code, but you cannot avoid understanding code" is the author's opinion, not a verifiable fact. The specific timetable, degree of completion, and actual effects of HEY's backend pivot to Rust and native clients were not disclosed in the source.

Insight takeaway

DHH's Campfire test claimed Rust is about 150 times faster than Rails, but the public repositories show the Rust version had 398 commits and 39 merged PRs (16 of them performance-related), while Elixir and Go each had only 3 commits, and the three versions' AGENTS.md task requirements differed—Rust was allowed to deviate from the Rails implementation and pursue speed, while Elixir and Go were required to preserve the reference implementation's behavior and were not given a performance number they had to beat. The core of the controversy is not whether Rust is faster, but in the Agent era, when the comparison conditions themselves are unequal, what performance numbers can still explain, and whether humans still need to understand code to judge whether a comparison is fair.

Primary report

InfoQ

Primary source