Quantcast
Channel: ReScript Forum - Latest posts
Viewing all articles
Browse latest Browse all 2592

ReScript vs TypeScript Performance 2025: Clean Build Benchmark Shows TypeScript 3x Faster on Large Codebases

$
0
0

Hi Everyone,

I’d like to share my findings for clean builds of large ReScript vs large TypeScript codebases. TL;DR: Clean builds of ReScript codebases appear to be slower than clean builds of TypeScript codebases, and the performance gap widens with codebase size.

My methodology:

  • Generated similar dependency graphs for both codebases, with approximately 12% of modules importing from a base module/package

  • Generated 1000, 2000, and 5000 ReScript/TypeScript files across 10 modules/packages, then performed clean builds

  • Ran three trials per test configuration, averaged the results, and aggregated them into the following findings:

  • 1000 modules / 10 packages: TypeScript 2.42s · ReScript 4.27s · TypeScript 1.77× faster

  • 2000 modules / 10 packages: TypeScript 3.36s · ReScript 7.97s · TypeScript 2.37× faster

  • 5000 modules / 10 packages: TypeScript 6.73s · ReScript 20.24s · TypeScript 3.01× faster

The codebase used to run these trials can be found here: GitHub - nathan-tranquilla/rescript-benchmarks

The setup is straightforward and should be simple to reproduce, so please scrutinize the approach if there’s something incorrect about it.

While incremental builds for ReScript do outperform TypeScript (though I have yet to run formal tests on this), clean builds remain very important for CI environments.

This result was not what I expected. While I hope to promote ReScript, this does seem to be an area where TypeScript still remains dominant.

I’m happy to run additional experiments.


Viewing all articles
Browse latest Browse all 2592

Trending Articles