Across five everyday programs, Faby uses ~20% fewer tokens on average than the mean of Python, TypeScript and Rust — and up to 33% on data-transformation code.
Same programs. One identical tokenizer. Every number below is reproducible — and we show the one task where Faby doesn't win.
Each task is implemented idiomatically in all four languages — no strawmen, no golfing. Switch tasks and compare the real code side by side.
| Task | Python | TypeScript | Rust | Faby | vs avg |
|---|
Tokens per program. “vs avg” = Faby vs the mean of the other three. Negative = fewer tokens.
One identical function counts tokens for every language: each word (identifier, keyword, number) is one token, and every other non-whitespace character (operator, bracket, punctuation) is one token. Applied uniformly, it rewards exactly what Faby optimizes for — fewer symbols per idea.
const tokens = code => (code.match(/\w+|[^\s\w]/g) || []).length
Programs are written idiomatically in each language — the way a competent developer (or a good model) would actually write them. No artificial verbosity in the others, no code-golf in Faby. Comments excluded. Each task solves the identical problem with identical output.
Every program on this page is shown in full above. Paste any two into the tokenizer and compare. Faby programs also run live in the playground.
match is slightly longer there. We show it anyway — a benchmark you can only trust if it includes the cases you lose.
That's the whole point of an AI-native language — and you can run every Faby program here in your browser.
▶ Try it in the Playground Read the Docs