Summary
The hypotheses
"Zig spends fewer tokens, compiles faster and the LLM gets it right first time": rejected here. It did pass on the first try, but cost far more than Rust: the agent had to read the Zig 0.16 standard library sources (new I/O API) to learn it, and a cold build compiles the standard library.
"Rust's target/ is huge": confirmed once dependencies and worktrees enter. In the HTTP server, Rust (tokio/hyper/axum) and Haskell (warp) pulled in packages; target/ lives per project, so every worktree repeats it (about 200 MB per worktree after debug + release + test builds of a ~200-line server). Rust is not alone: C# and Haskell used even more per project. Go keeps almost everything in its shared global cache.
"More concise code costs fewer tokens": confirmed for code, with caveats for cost. Python, TypeScript, JavaScript and Kotlin were the cheapest, and final code size tracks agent cost closely. But TypeScript's code was ~1.26× JavaScript's (the article says 1.31×) while the agent spent the same on both, and knowing the language version matters as much as conciseness.
"Svelte < Vue < React": confirmed, with ratios close to the article's, measured with a different tokenizer.
Cheap to write is not fast to run: the three cheapest languages for the agent (Python, TypeScript, JavaScript) produced the slowest code, about 5.6–6.5× the fastest on the speed index; Assembly, Zig and C were the fastest and among the most expensive to write. Go and Rust were the best compromise: both in the cheaper half to write and the faster half to run.
"Rust + React": defensible. Rust was among the cheapest back ends for the agent; React was the most expensive front end.
Details in the paper (PDF) .
Ranking
Cost to write
Sum of the medians of the 4 back-end tasks. Click a header to sort. "Solved" = passed every hidden test, which the agent never saw.
Performance of the code
Each task scores 100 × fastest time ÷ this language's time (kvhttp: this throughput ÷ the best), so 100 is the fastest. Score = geometric mean of the four; speed index = 100 ÷ score, how many times slower than the fastest. Hover a cell for the measurement; method in Final code performance .
By task
Build & disk
Cold build from a clean copy with isolated caches (HOME, CARGO_HOME, GOCACHE, Zig, Nim, cabal, opam and NuGet caches all point to an empty directory). "Disk" adds the project directory after the build (target/, .zig-cache/…) and the global caches it created. In kvhttp the agent could choose dependencies.
Worktrees multiply whatever lives in the project directory (Rust's target/, .zig-cache, .NET's bin/ and obj/…); global caches (GOCACHE, the cargo registry, the cabal store) are shared. Parallel agents usually get one worktree per task.
Final code performance
The performance ranking above scores each of the four benchmarks below as 100 × fastest ÷ this (throughput inverted for kvhttp) and combines them by geometric mean; the speed index is 100 ÷ that score, 1.00× meaning fastest everywhere.
Only runs that passed every hidden test. Command-line tasks: median of 5 runs on a large input (wordfreq 50 MB, lru 1 million commands, calc 200 thousand expressions), with peak memory. kvhttp: requests per second with 64 concurrent clients, one connection per request.
Specialised tracks
Languages that cannot run the main tasks get tasks from their own domain, with the same rounds (write, verify live, repair) and a verifier first validated against reference solutions. Each track is ranked on its own; sums are over the track's two tasks, so they are not comparable with the main ranking.
Scientific computing (Octave, Julia, R): least-squares regression and dense linear algebra, checked to 1e-6.
Theorem proving (Lean 4, Rocq, Dafny): list lemmas and insertion-sort correctness; the file must check, with no sorry/Admitted/assume and every statement unchanged.
Smart contracts (Solidity, Vyper): a token with allowances and a linear-vesting contract, deployed on a fresh anvil and exercised with exact timestamps, reverts and events.
Zero-knowledge circuits (Circom, Noir): a private range check and a 4×4 Sudoku; valid inputs must be provable and invalid ones must not.
React × Vue × Svelte
Our measurement: one agent per framework (3 repetitions) wrote the same 6 components (the article's 5 plus a client for kvhttp). Tokens counted with Opus 5.5's tokenizer, with cl100k alongside to compare with the article, which uses Svelte as its baseline. The agent runs nothing; in round 3 the harness builds with Vite and tests in a browser (Chromium, mocked network).
Mini app: shopping cart
Components talking to each other: parent → child through props, child → parent through events, a global store (the agent picks the library), derived state (subtotal, tax, total), a two-way-bound form with validation, a debounced search with cleanup, context / provide–inject for the currency, and a modal that takes content through children / slot / snippet. Verified in round 3 with a Vite build and a browser (renders, adds to cart, debounced search, no runtime errors). SPEC
Full-stack combinations
One complete feature: the kvhttp server in the back-end language plus the KvBrowser component in the framework, both in Opus 5.5 tokens (median of the repetitions). In bold, the four stacks from the original conversation: Rust/Zig × React/Vue.
Repair (round 4)
Every run that failed verification (round 3) got a fresh agent with the failure report, like a bug report, and up to 3 attempts. We measure what it took to get to green.
Cases
Each individual run: agent metrics, failed tests and the code it left behind.
Language
Task
Repetition
Method
Inspiration
The series "The Tokenomics of Web Development" measures hand-written snippets with tiktoken. Here we measure the whole process, in the style of DeepSWE : one agent per task, hand-written hidden tests, pass@1 and cost per task.
Rounds
Write : one agent per case writes the code, testing only against the examples.
Write (extra languages, Svelte, shop) : the same, same prompt.
Verify , once, live: back ends with a clean build + hidden suite; front ends with a Vite build + browser (Chromium) with mocked network, checking only what the SPEC states literally plus "no runtime errors".
Repair : each failure gets a fresh agent with the failure report, up to 3 attempts.
Execution
One claude -p (headless Claude Code) per case: model claude-opus-5-5, effort high, tools Bash, Read, Edit, Write; no web, MCP, plugins or CLAUDE.md; an empty directory outside the repository.
Identical prompt for every language; only the language name and toolchain version change. Tasks 1–3: standard library only. kvhttp: dependencies allowed if an experienced engineer would use them in production.
The agent gets SPEC.md, examples in cases.json and check.mjs. The grade comes from a separate hidden suite that the harness runs later on a clean build.
Tokens and cost come from Claude Code's final event (usage, total_cost_usd at list price: $4 / $20 per million input / output tokens). Cost includes cache reads and writes.
"Code tokens": the source files and manifests the agent left (no lockfiles or build output), counted with Opus 5.5's tokenizer as the input-token difference between a prompt with the code and an empty one.
"1st try": the first run of check.mjs already passed every example. "Compiler errors": build calls whose output carries a compiler diagnostic (file:line:col: error:, error[E…], Nim's Error:, a failed go build). "Stdlib reads": tool calls that read the toolchain's own sources or docs (e.g. lib/zig/std, rustlib/src, go doc) to learn an API.
Tasks
Limitations
3 repetitions per case: small differences are noise. Look at the min–max ranges.
One model, one harness, one machine (macOS arm64). Other models know each language differently; Zig and Odin change their APIs often.
Small tasks (minutes, not hours). Large projects may reorder the ranking.
The front-end check is a smoke test (build + browser), not a full suite.
Swift and C# are confounded by the test machine (Command Line Tools, no Xcode): SwiftPM aborts at start-up (mismatched llbuild) and .NET Native AOT cannot link, so their first builds failed until the agent found a workaround. Their costs include that detour.
Round 3 found two bugs in the harness itself, fixed before the repair round, with the affected cases re-verified: the build-output filter dropped bin/, which is source in dune (OCaml); and the first launch of a freshly built binary on macOS took over 3 s (Haskell, 48 MB). The verifier now launches each binary once before the suite.
Reproduce
npm ci
npm run selftest # the verifier accepts the reference solutions
npm run bench -- --reps 3 # agents (uses your Claude Code login)
npm run verify # round 3: cold build + hidden tests
npm run verify:front # round 3: Vite + Chromium (front end)
npm run repair # round 4: repair with the failure report
npm run perf # performance of the passing binaries
npm run count # code tokens (Opus 5.5 + cl100k)
npm run aggregate # public/data/results.json
npm run paper # paper/data.tex + public/paper.pdf (needs tectonic)
Contribute
Suggestions, corrections and changes to the method are welcome. Email abeilice@ufmg.br , or open an issue or a pull request on GitHub : new tasks, new languages, a better harness, or a re-run on another model or machine.