Same Agent Reimplements Liquid in Rust vs C: Rust Uses 42% Fewer Tokens, C Runs 1.7x Faster
antirez · x · 2026-11-03
An experiment ('Liquid Fight Club') ran the same agent (Claude Opus 5.5, effort high, auto permission mode) to reimplement the Liquid template engine from its spec in Rust and C. Both arms passed all 6,240 in-scope specs. Key findings:
- Tokens to finish: Rust 66.5M vs C 115.2M total (42% fewer); output tokens 27% fewer. Tokens to pass all specs roughly tied (30.2M vs 29.4M).
- Correctness: differential testing found C diverges from Ruby in 3 ways (7 cases), Rust in 7 (288 cases), but C's worst bug (garbled string dates) is more severe — Rust slightly more correct overall.
- Performance: C wins — parse 1.7x and render 1.55x faster, 9MB less peak RSS.
Takeaway: for agent-written code, Rust costs less overall with milder bugs; C keeps the runtime speed edge.
More from coding & agent
- Ex-GitHub data science lead: skip PRs, push direct to main with agents — hugobowne · 2026-11-03
- Zed CEO shares weekly agent changelog automation summarizing 250 commits — zeeg · 2026-11-03
- 'Forget PRs, push direct to main': the emerging human+agent engineering workflow debate — hugobowne · 2026-11-03
- OpenAI Agents API ships automatic review, bringing Codex-style "approve for me" to agents — craigsdennis · 2026-11-03
- FastAPI Cloud goes GA after beta with thousands of apps deployed — honnibal · 2026-11-03
- Latent Space pod: MIT's Alex Zhang on RLMs, agent swarms and OpenAI's 10,000-agent experiment — niloofar_mire · 2026-11-03