Cloudflare’s tsrs: What the 8× TypeScript Claim Actually Compares

Cloudflare’s Rust port of the TypeScript checker claims up to 8× the speed, yet its docs list errors that come and go between runs. What was that 8× measured against?

Cloudflare’s tsrs: What the 8× TypeScript Claim Actually Compares
TLDR
  • Cloudflare introduced the experimental Rust-based tsrs project on October 20.
  • Its initial “up to 8×” comparison uses TypeScript 7.0 with equal checker-worker counts.
  • A migration decision also needs matching diagnostics, exit codes and repeatable results.

The headline compares against TypeScript 7.0

Cloudflare reports early results of up to eight times the speed and roughly 70% less memory at the same type-checker worker count. The default adaptive configuration can spend more memory for additional speed, so it is a different comparison.

TypeScript 7.1 is another moving part

Microsoft released the TypeScript 7.1 beta on October 20. A result measured against 7.0 does not establish the same lead over that newer beta.

The tsrs repository targets a stable release with full TypeScript 7.1 conformance. It is a separate project, not Microsoft’s official distribution. Its compatibility objective should not be read as a guarantee already demonstrated for every application.

A faster checker must still report the right errors

The project’s compatibility definition is strict: differences from the pinned Go implementation in diagnostics, their order, message text or exit code count as bugs. That is the useful baseline for evaluating a replacement in CI.

The README currently discusses known checker-order behavior that can make errors appear or disappear. Boshen’s October 23 issue addresses this repeatability problem. A particular failure frequency mentioned there had not been independently reproduced. The issue’s closed status should not be read as proof of deterministic results for all programs.

Compare one project under controlled conditions

The benchmark methodology pins project commits and configuration, then records compiler versions, arguments, environment and individual samples. Wall time is stored in seconds and peak RSS in bytes. Results from different projects are not collapsed into one average.

Applied to a team’s migration trial, those principles suggest keeping three sets of evidence:

MeasureRecord alongside it
Time and memoryVersions, worker counts, identical source and configuration.
Error detectionDiagnostic differences and exit-code differences.
RepeatabilityWhether repeated runs on unchanged input report different errors.

The repository’s starting commands run a type check without emitting files:

pnpm add -D tsrs
pnpm exec tsrs --noEmit

Keep the existing checker as a comparison while evaluating tsrs. A useful speed gain is one measured on your code with the diagnostic behavior your build depends on.

Frequently asked questions

Is tsrs an official Microsoft TypeScript release?

No. Its repository states that the project is not affiliated with or endorsed by Microsoft.

Do conformance tests remove the need for project-level comparison?

No. The repository does not promise deterministic results for every program. Compare diagnostics and exit status on your own unchanged input.