Benchmarks
Two suites on date-fns. Numbers come from docs/bench/results.json, produced
by npm run bench (harness in bench/).
typescript-eslint recommendedTypeChecked
An existing typed ESLint config, unchanged.
Wall timemedian; the line underneath marks min–max; shorter is better
- ESLint2.98 sbaseline
- lintrs3.63 s1.22× slower
- lintrs (in-process)3.52 s1.18× slower
Peak memorymedian RSS; shorter is better
- ESLint987 MBbaseline
- lintrs670 MB−32%
- lintrs (in-process)652 MB−34%
- lintrs vs ESLint: same diagnostics; 3 message text differences
- lintrs (in-process) vs ESLint: same diagnostics; 3 message text differences
All numbers
| Scenario | Description | Wall median | Wall min–max | Peak RSS median | Messages |
|---|---|---|---|---|---|
| ESLint | eslint CLI, no cache | 2.98 s | 2.94 s – 3.01 s | 987 MB | 581 |
| lintrs | lintrs CLI, default transport (tsrs session in a child process) | 3.63 s | 3.52 s – 3.72 s | 670 MB | 581 |
| lintrs (in-process) | lintrs CLI with the in-process Node-API binding | 3.52 s | 3.44 s – 3.56 s | 652 MB | 581 |
One custom typed rule: JS vs Rust
A single rule that asks the checker for the type of every call expression and reports unions, written once in JS and once in Rust.
Wall timemedian; the line underneath marks min–max; shorter is better
- ESLint (JS rule)2.14 sbaseline
- lintrs (JS rule)1.00 s2.14× faster
- lintrs (Rust rule)0.65 s3.29× faster
Peak memorymedian RSS; shorter is better
- ESLint (JS rule)937 MBbaseline
- lintrs (JS rule)351 MB−63%
- lintrs (Rust rule)309 MB−67%
- lintrs (JS rule) vs ESLint (JS rule): 7 only in this scenario
- lintrs (Rust rule) vs ESLint (JS rule): 7 only in this scenario
All numbers
| Scenario | Description | Wall median | Wall min–max | Peak RSS median | Messages |
|---|---|---|---|---|---|
| ESLint (JS rule) | eslint CLI running the JS rule | 2.14 s | 2.11 s – 2.17 s | 937 MB | 355 |
| lintrs (JS rule) | lintrs in-process running the same JS rule | 1.00 s | 0.96 s – 1.01 s | 351 MB | 362 |
| lintrs (Rust rule) | lintrs in-process running the rule written in Rust (library already built and cached) | 0.65 s | 0.62 s – 0.66 s | 309 MB | 362 |
Reading the results
- Stock typed rules: lintrs is currently slower than ESLint and uses less
memory, with the same diagnostics. The difference is moving each type
answer from the Rust checker into the objects these JS rules expect, not the
checker or the rules; see
why.
Profiling shows where it goes per rule (
TIMING=1). - Message text differences in the stock suite are the order of union
members in three
no-redundant-type-constituentsmessages (0 | 1 | 2 | 10 | 3 | …against0 | 1 | 2 | 3 | … | 10): the same type, printed in TypeScript's internal type order. That order varies between ESLint's own runs; lintrs printed it the same way every time. - One checker-heavy custom rule: the JS rule takes less wall time under lintrs than ESLint. Its Rust version takes less still.
- Extra diagnostics in the custom suite come from TypeScript 7 generic
inference (date-fns
ResultDate extends Date = DateTypeinfers a union), not a rule bug.
Methodology
- Machine
- Apple M4 Pro, 14 cores, 24 GB, Darwin 25.5.0 arm64
- Target
- date-fns/date-fns v4.1.0 (
313b902b9a72) - Runs
- 7 timed after 1 warmup, interleaved between tools
- Timer
- /usr/bin/time -l (wall-clock 'real' and maximum resident set size)
- Cache
- ESLint --cache off; lintrs's Rust rule library prebuilt in its cache before timing
- Versions
- node v24.22.3 · lintrs 6a80aa6+working-tree · eslint 9.39.5 · typescript-eslint 8.72.2 · typescript 5.9.3 · oxlint 1.83.0 · tsrs c21a36ef
- Generated
Reproduce with the benchmark harness in bench/: npm run bench.
