How much does a programming language cost a coding agent?

Same tasks, same prompt, one isolated Claude Opus 5.5 agent per case. We count tokens, dollars, time, compiler errors, hidden tests, build disk and final binary performance.

Want more models, languages or repetitions? Sponsor the next round →

Summary

The hypotheses

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.

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.


    
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

  1. Write: one agent per case writes the code, testing only against the examples.
  2. Write (extra languages, Svelte, shop): the same, same prompt.
  3. 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".
  4. Repair: each failure gets a fresh agent with the failure report, up to 3 attempts.

Execution

Tasks

Limitations

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.