· Timo Kilpilehto · 6 min read
Does the language still matter when the AI writes the code?
An AI agent built the same API ten times, in five languages, with and without a framework. The language still matters, but for what you own and run, not for building it.
Draft. Part 1 of 3 in the series Does the language still matter when the AI writes the code? The numbers are final; the wording is not.
For thirty years, picking a programming language was mostly a bet on people: how fast your team writes it, how many bugs they ship in it, how easy it is to hire for. If an AI agent writes most of the code, that bet changes. So I measured it.
An agent — Claude Code with Claude Opus 5.5, working alone with no human in the loop — built the same API ten times: Python, Ruby, TypeScript, Java and Rust, each once with only the standard library and a few basics, and once with the mainstream framework. The API is a Google Keep–style notes service on PostgreSQL: accounts and tokens, notes and nested checklists, labels, ordering, optimistic concurrency, rate limits. Then I made it grow twice, each time in a fresh session that only had the previous session’s code to go on: first note sharing between users, then an incremental sync feed for offline clients. A test bench of about 1,000 black-box tests, a fuzzer, a crash-recovery check and load tests measured every version the same way.
Correctness: no longer a differentiator
Every one of the ten implementations passed at least 99 % of the base spec. Sharing: 97–100 %.
The sync feed — whose whole point is that no change is ever missed while concurrent requests commit
out of order — 97–100 %, and nine of ten passed a concurrent stress test of exactly that. Every
build survived kill -9 with no data lost, every upgrade kept the previous version’s data, and
across 20 growth steps there was not a single regression.
That’s not because the tests were easy: they caught real bugs — a refresh that reused the same token within one second, 500s under concurrent writes, wrong error codes for edge-case input, and one sync feed that lost changes under load even though the agent had named that exact trap in its own README and built a fix for it. It’s because, at this size, the model gets it right in every language. Correctness is where languages used to compete. At this scale they don’t any more.
Effort to build: roughly the same
| Build cost per series (3 steps) | Lean | Framework |
|---|---|---|
| Python | $4.42 | $6.26 |
| TypeScript | $4.60 | $5.86 |
| Ruby | $4.94 | $6.82 |
| Rust | $5.41 | $5.98 |
| Java | $6.50 | $6.67 |
The first build costs $2.40–3.80 and takes 10–17 minutes. Each growth step costs about a dollar and takes five to ten minutes, whatever the language. Rust and Java cost a little more to build from scratch; after that the difference is within noise (one cell built three times varied by ~20 %). The expensive languages are not expensive for the agent.
The code you own: 1.5–2× more
| Code to maintain at step 3 (tokens) | Lean | Framework |
|---|---|---|
| Python | 29k | 25k |
| Ruby | 31k | 29k |
| TypeScript | 32k | 36k |
| Rust | 41k | 42k |
| Java | 54k | 44k |
Same behaviour, same tests passing, and Rust and Java need 1.4–1.9× the code of Python or Ruby. The note logic itself is the same size everywhere; the difference is types, structs, DTOs, imports, wiring and error plumbing. The agent doesn’t mind writing it. But somebody has to review it, and every future change — by a human or an agent — has to read it.
What the extra code buys: CPU
| Server CPU per request (4 cores, 64 users) | Base API | After sharing + sync | Peak memory |
|---|---|---|---|
| Rust (axum) | 0.8 ms | 1.1 ms | 83 MB |
| Rust (hand-written) | 1.0 ms | 1.6 ms | 41 MB |
| Java (hand-written) | 1.1 ms | 2.0 ms | 1.1 GB |
| TypeScript (hand-written) | 1.6 ms | 2.8 ms | 0.9 GB |
| Ruby (hand-written) | 2.7 ms | 4.8 ms | 57 MB |
| Java (Spring Boot) | 2.7 ms | 3.7 ms | 0.7 GB |
| Python (hand-written) | 3.1 ms | 4.7 ms | 118 MB |
| TypeScript (NestJS) | 4.6 ms | 11.2 ms | 1.0 GB |
| Ruby (Rails) | 5.8 ms | 9.4 ms | 201 MB |
| Python (Django) | 9.9 ms | 19.4 ms | 82 MB |
Rust uses 3–4× less server CPU per request than hand-written Python or Ruby, and up to 18× less than the heavier frameworks. The surprise is the JVM: hand-written Java is as frugal with CPU as Rust — and holds 25 times the memory. Node sits in between on CPU, and near the JVM on memory. “Compiled vs interpreted” is the wrong axis; the runtime and the framework on top of it matter more.
Two things temper this. First, the database catches up. After the sync feed was added, every write also records a change, and PostgreSQL’s share of the work grew in every implementation. Counting the database’s CPU too, a Rust request was only about 1.5× cheaper than a hand-written Python or Ruby one. In fact the fastest servers were limited by the database: Postgres sat at 80–90 % of its two cores while the Rust, Java and Node servers used a quarter of their four.
Second, features cost more speed than the language does. Adding sharing and sync made every implementation 2–3× slower. The language moved the needle less than the spec did.
So does it matter?
Yes — but the reasons moved.
It no longer matters much for getting it built or getting it right: at this scale the agent does both in any of these languages, for about the same money. It matters for what you own afterwards: in a verbose language, 1.5–2× more code to review, audit and read. And it matters for what you pay to run it: a Rust service needs a third of the app-tier CPU of a Python or Ruby one and a tenth of the memory of a JVM or Node one — decisive at scale, irrelevant for a service that idles.
For most services I’d now pick the language for the second-order reasons: who has to review the code, what the runtime costs at your load, and what the ecosystem gives you at runtime. “Which language is faster to write?” has stopped being the question.
What I couldn’t test
My hypothesis was that less code would let the agent take a system further before it starts getting lost — the way a big codebase slows a team down. I couldn’t see that: at 20–55k tokens of code, nothing degraded, in any language. That needs a much longer growth sequence on a much bigger system, and it’s the experiment I want to run next. Also: one model, one kind of system (a CRUD-ish API), and one build per cell — read the differences under ~10 % (size) and ~20 % (cost) as noise.
Part 2 looks at frameworks — and why Rails didn’t help the agent the way it helps us. Part 3 is about the eight ways this benchmark gave me confident, wrong answers along the way.