Menu

tsrs vs tsc on a real 6,600-file Next.js app: 11x faster, zero missed errors, and why we are not switching yet
📰

tsrs vs tsc on a real 6,600-file Next.js app: 11x faster, zero missed errors, and why we are not switching yet

DEV Community: rust·Kelvin·1 day ago
#B2OXH5hq
#devtorust#devto#dev#tsrs#faster
Reading 0:00
15s threshold

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 catches?

Does the speedup land where we actually wait?

Short version: on my laptop it was 11x faster on a cold check and used about half the memory, and it missed zero errors across 57 test cases. We are still not switching yet. The reasons are below, along with the gotchas that nearly made me publish wrong numbers.

The setup

Codebase: a Next.js 16 app deployed to Cloudflare Workers. The type check covers about 6,600 tracked TypeScript files in one project, with no project references.

Current compiler: TypeScript 7.0.2, which is already the native Go compiler. So this is not "Rust vs the old JavaScript tsc".…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.