Link · danluu.com ↗
How does programming language affect token efficiency and correctness?
Luu takes the claim that dynamic languages are two to three times more token-efficient than static ones, with J at nearly half of Clojure's count, and reruns it on two tasks with real surface area: a Zstd decoder written from the RFC and a modified pandoc task from ProgramBench, scoring token cost against correctness. At medium effort the dynamic-language edge shows up about as advertised; at the highest effort level the picture is mixed and static languages hold their own or win. Language popularity tracks performance weakly to moderately. He is explicit that this is two tasks, that trivial-problem evals mislead, and that his own harness still has flaws he has not found. The advice is dull on purpose: use a mainstream language and stop optimizing for token density.
Comments
Loading comments…