Benchmarks

@tsrx/yuku against the official parser, @tsrx/core (opens in new tab), both building an ESTree AST. The numbers on this page are read from the repository when the site is built: the chart from bench/chart.svg (opens in new tab) and the table from the README (opens in new tab).

The test suite#

Parsing the 1,987 TSRX sources of the test suite (opens in new tab) that parse.

Time per file to parse the 1,987 sources of the test suite: @tsrx/yuku 4.8 µs, @tsrx/core 43.9 µs, 9.19x as long

4.8 µs a file against 43.9 µs: 9.2x faster. Median time per file over 3 runs, each in a fresh Node.js 24 process on an Apple M5 Pro.

The pages of tsrx.dev#

The pages of tsrx.dev (opens in new tab), 319 kB in all, in milliseconds, the same way over 5 runs.

page @tsrx/yuku @tsrx/core 0.5.5
specification 0.554 1.949
getting-started 0.431 2.059
features 0.376 1.726
compiler-demo 0.145 1.451
blog-rethinking-tsrx 0.094 0.396
blog-removing-lazy-destructuring 0.084 0.301
index 0.083 0.385
blog-simplifying-tsrx-after-feedback 0.069 0.334
blog 0.028 0.127
playground 0.013 0.093
layout 0.006 0.176
total 1.883 8.998

4.8x faster than @tsrx/core in all, 1.883 ms against 8.998 ms.

Run them#

git clone https://github.com/tsrx-org/yuku
cd yuku
bun install
bun run bench

It needs Zig 0.17, Bun, and Node.js 24, as Work on it describes. bun run bench builds the package, then times each parser over every source of test/suite/pass with tinybench (opens in new tab), each run in a fresh Node.js process, and writes bench/chart.svg with the median. Run it on a quiet machine. A change that makes parsing slower needs these numbers before and after.

Yuku#

The parser underneath is Yuku (opens in new tab). Its own benchmarks, natively and on npm, against Oxc, SWC, Babel, and Acorn, are on yuku.fyi (opens in new tab).