Docs / Benchmarks

How fast are we?

Continuous benchmarks of Yarn 6.x, Yarn 4.x, npm, pnpm, and Yarn Classic across four install scenarios on three reference projects. Lower is better.

Last run
2026-05-09
Runner
ubuntu-22.04 4 vCPU · 16 GB
Data points
90 days of history
Project
SeriesClick to mute · y-axis = seconds
scenario \ project
Next.js
Gatsby
Monorepo
§ 01 · scenario

Full cold install

Simulates the very first install on a machine that has never seen the project — no cache, no lockfile, no artifacts. Everything is fetched from the registry and written from scratch.

Next.js
Gatsby
Monorepo
§ 02 · scenario

Cache only

Like checking out a repo for the first time on a CI runner that has already built other projects. The lockfile is missing so resolution runs from scratch, but tarballs are reused from the global cache.

Next.js
Gatsby
Monorepo
§ 03 · scenario

Cache + lockfile

The most common CI and day-to-day path. The lockfile and cache are both present — the manager just needs to materialize dependencies on disk.

Next.js
Gatsby
Monorepo
§ 04 · scenario

Recurrent call

Everything is already in place. Measures how quickly the manager can verify the tree and exit — matters every time you run install as part of a script or editor hook.

Next.js
Gatsby
Monorepo
§ Aggregate

Median across all scenarios.

Geometric mean of cell medians, normalized to the slowest in each row so the chart compares relative performance across scenarios of different absolute scale. Lower is faster.

Cold install · normalized

yarn 6.x
0.12×
pnpm
0.21×
yarn 4.x
0.29×
yarn classic
0.70×
npm
0.74×

Cache + lockfile · normalized

yarn 6.x
0.11×
pnpm
0.16×
yarn 4.x
0.18×
yarn classic
0.51×
npm
1.00×

Methodology

Every four hours — and on every push to main — a GitHub Actions workflow runs the full benchmark matrix. Each combination of scenario, project, and package manager is timed with Hyperfine, measuring wall-clock duration. The results are published here automatically.

How benchmarks run

Hyperfine executes each install command a minimum of 10 times after 1 warmup run. Before every timed run, a prepare step resets the environment to match the scenario — for example, deleting node_modules, the lockfile, or the global cache — so each measurement starts from the same state. The final result is the median of all timed runs.

The runner is ubuntu-latest on GitHub Actions. zpm is compiled from source with the release-lto profile; all other managers use their latest stable release at the time of each run.

NOTE
Series rendered with a dashed stroke (yarn classic) are kept for historical reference. Yarn classic is in maintenance and we do not recommend it for new projects — the modern release line is what you want for production work.

Reference projects

We chose real-world TypeScript projects with different dependency profiles to test a wide variety of use cases.

Reference projects
Project Description
next Next.js vendors most of its dependencies except native ones. Small dependency graphs with very heavy packages.
gatsby Gatsby lists its dependencies raw, without vendoring. Very large dependency graph made up of small packages.
monorepo Synthetic monorepo of around ~1.5k workspaces, each with their own arbitrary set of dependencies.