# Rjest performance report: Apple M2 · 16 GiB

Captured 2026-09-18T16:12:14.762Z from commit `22341d9b5fb61e29570c8555e3c880f59a692590` with a clean worktree.

> These are controlled results for the workloads and machine below, not a claim that Rjest is universally faster than Jest.

## Result

| Workload             | What it isolates                                  | Jest median | Rjest median |    Rjest vs Jest | Jest peak RSS | Rjest peak RSS |
| -------------------- | ------------------------------------------------- | ----------: | -----------: | ---------------: | ------------: | -------------: |
| Cold start           | one Node test file and one assertion              |    499.6 ms |     241.8 ms | **2.07x faster** |        94 MiB |         51 MiB |
| Assertion throughput | 50,000 Jest-style equality assertions in one file |      2.87 s |     974.7 ms | **2.95x faster** |       116 MiB |        117 MiB |
| Many files           | 48 files and 384 tests across four workers        |      1.67 s |       1.20 s | **1.39x faster** |       127 MiB |        101 MiB |
| Discovery            | list 1,500 test files without executing them      |    550.8 ms |     186.8 ms | **2.95x faster** |        83 MiB |         48 MiB |

Peak RSS is the maximum value reported by `/usr/bin/time` across measured runs when that tool is supported. It is not a sum of every concurrently live worker.

## Variability

| Workload             |                           Jest mean and spread |                         Rjest mean and spread |
| -------------------- | ---------------------------------------------: | --------------------------------------------: |
| Cold start           |  505.3 ms mean · σ 12.7 ms · 497.5 ms–535.2 ms |  241.8 ms mean · σ 1.8 ms · 238.8 ms–244.3 ms |
| Assertion throughput |       2.66 s mean · σ 777.0 ms · 1.73 s–3.51 s |  841.8 ms mean · σ 240.7 ms · 541.6 ms–1.17 s |
| Many files           |       1.72 s mean · σ 215.8 ms · 1.41 s–2.11 s |      1.30 s mean · σ 213.2 ms · 1.07 s–1.75 s |
| Discovery            | 605.6 ms mean · σ 136.1 ms · 447.0 ms–816.8 ms | 182.7 ms mean · σ 24.2 ms · 151.3 ms–218.8 ms |

Spread is the population standard deviation followed by the observed minimum–maximum range. The relative result above is Jest median divided by Rjest median.

## Method

- 2 warm-up pair(s), then 10 measured pair(s) per workload.
- Runner order alternates on every pair to reduce ordering and thermal bias.
- Both runners use the pinned dependency graph, disabled transform caches, CI mode, and equivalent worker counts.
- A correctness preflight must match suite, test, pass, failure, and file-error counts before timing starts.
- Wall time includes CLI startup, discovery, execution, reporting, and shutdown.

## Environment

- Machine: Apple M2 · 16 GiB
- OS: darwin 25.6.0 (arm64)
- Memory: 16384 MiB
- Node: v25.9.0
- Rust: rustc 1.95.0 (59807616e 2026-04-14)
- Jest package: 30.5.0 (CLI reports 30.4.2)
- Rjest: rjest 0.1.0-alpha.2

## Commands

### Cold start

```sh
node_modules/jest/bin/jest.js --config=./benchmarks/generated/startup/jest.config.cjs --runInBand --no-cache --ci --silent
target/release/rjest --config=./benchmarks/generated/startup/jest.config.cjs --runInBand --no-cache --ci --silent
```

### Assertion throughput

```sh
node_modules/jest/bin/jest.js --config=./benchmarks/generated/assertions/jest.config.cjs --runInBand --no-cache --ci --silent
target/release/rjest --config=./benchmarks/generated/assertions/jest.config.cjs --runInBand --no-cache --ci --silent
```

### Many files

```sh
node_modules/jest/bin/jest.js --config=./benchmarks/generated/many-files/jest.config.cjs --maxWorkers=4 --no-cache --ci --silent
target/release/rjest --config=./benchmarks/generated/many-files/jest.config.cjs --maxWorkers=4 --no-cache --ci --silent
```

### Discovery

```sh
node_modules/jest/bin/jest.js --config=./benchmarks/generated/discovery/jest.config.cjs --listTests --no-cache
target/release/rjest --config=./benchmarks/generated/discovery/jest.config.cjs --listTests --no-cache
```

## Reproduce

```sh
npm ci
cargo build --release -p rjest-cli
npm run benchmark
```

Raw timing samples and exact metadata: [apple-m2-2026-09-18.json](./apple-m2-2026-09-18.json)
