tsrs vs tsc on a real 6,600-file Next.js app: 11x faster, zero missed errors, and why we are not switching yet
A week after Cloudflare and VoidZero announced tsrs, a Rust port of the TypeScript 7 compiler, I benchmarked it against the compiler we already run. The vendor numbers say up to 8x faster and about 70% less memory than TypeScript 7. I wanted to know three things for our own codebase: Is it faster on our code, not on someone else's benchmark? Does it catch every error the official compiler…
In a comparison between TypeScript's compiler (tsrs) and the official TypeScript 7 compiler, tsrs demonstrated significant improvements in speed and memory usage. For a Next.js 16 app with 6,600 tracked TypeScript files, tsrs was found to be 11 times faster on a cold check, use about half the memory, and missed no errors across 57 test cases.
However, tsrs was not yet ready to be switched to due to several reasons, including differences in supported TypeScript versions and exit code changes. The benchmark also revealed that tsrs reported one less diagnostic than the official compiler for some tests, but this was later found to be a duplicate error. To ensure accurate comparisons, it is crucial to use the same TypeScript version for all tests, generate separate tsbuildinfo files for each compiler, and avoid using incremental caches across compilers.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.