Adds TSX to the benchmarks: a classic-runtime transform and a JSX-preserving strip, timed against every tool that parses TSX.
What changes #
scripts/oss.shalso checks out.tsxfiles for Sentry's frontend and Excalidraw.node scripts/oss-sample.mjs tsxdraws a seeded 10MB sample of 1,603 files from them, written tocorpus/oss-tsx-sample.json(gitignored, like the other samples).bench/throughput.mjs --mode=jsxand--mode=jsx-preservetime each tool's TSX path, registered inbench/tools.mjs: typestrip, oxc-transform, sucrase, esbuild,ts.transpileModule, and ts-blank-space for preserve.docs/benchmarks.mdpublishes the two tables.
Results #
Median of 2 to 4 runs, at a load average of 5 to 10:
| typestrip | oxc-transform † | sucrase | esbuild † | ts.transpileModule | |
|---|---|---|---|---|---|
| classic runtime, MB/s | 67.3 | 50.4 | 16.6 | 5.8 | 2.5 |
| JSX kept, MB/s | 64.3 | 52.6 | 19.4 | 6.7 | 2.4 |
† Native code. typestrip is 1.3× oxc-transform when transforming and 1.2× when keeping the JSX. oxc-transform uses the least memory. No tool fails any of the 1,603 files.
Verification #
All 9,368 .tsx files in the two projects pass the JSX judge in both modes.
Stacked on #1.