We Measured the LLM Token Cost of 5 Languages. TypeScript Costs 31% More Than JavaScript
Part 2 of “The Tokenomics of Web Development” — a controlled comparison of 22 web technologies, 115 idiomatic snippets, one tokenizer.
We’re used to judging programming languages by the familiar criteria:
- type safety;
- DX;
- performance;
- scalability.
For the last 5+ years the industry moved one way: type everything, TypeScript is the default, untyped JS is legacy. I don’t argue with that as an engineering practice. But with LLMs a new layer showed up that didn’t exist before: when code is read more and more by a model rather than a human, the habit of writing verbosely grows a bill — and it’s visible right there in the API. I decided to measure it.
In Part 1 I ran five frontend frameworks through the same test — Angular came out 38% heavier than Sveltefor identical components. In this part we drop down to the language itself, which runs the same...
Copyright of this story solely belongs to hackernoon.com. To see the full text click HERE