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, on Linux and macOS. Lower is better.

Last run
2026-11-30
Runners
ubuntu-latest x64 · 4 vCPU · 16 GB
macos-latest arm64 · 3 vCPU · 7 GB
Data points
89 days of history
Project
Platform
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 per-project medians for each series, then normalized so the slowest series reads as 1.00×. Every other series is the ratio of its average run time to the slowest. Lower is faster.

Cold install · normalized

yarn 6.x
0.06×
pnpm
0.11×
yarn 4.x
0.20×
npm
1.00×

Cache + lockfile · normalized

yarn 6.x
0.03×
pnpm
0.07×
yarn 4.x
0.12×
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 (down to 3 times for the few combinations where a single install takes several minutes, such as npm on the monorepo). 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 mean of all timed runs.

The benchmarks run on GitHub Actions, on both the ubuntu-latest (x64) and macos-latest (arm64) runners; the Platform setting picks which results are displayed, Linux being the default. The two aren't the same hardware, so durations shouldn't be compared across platforms. zpm is compiled from source with the release-lto profile; all other managers use their latest stable release at the time of each run.

Shared runners are noisy, and a run occasionally takes several times longer than its neighbours. The Exclude outliers setting caps the vertical axis of each chart right above the 75th percentile of its slowest visible series, so that more than 75% of the data points of every series stay in view and the rare spikes run off the top of the chart instead of flattening everything else.

NOTE
Series rendered with a dashed stroke (yarn classic) are kept for historical reference, and are hidden until you click their legend entry. 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 6k workspaces, each with their own arbitrary set of dependencies. It's a Yarn project: the manifests are translated for the other package managers (workspace: ranges, resolutions), and npm is only measured on Linux since it needs more memory to install it than the macOS runners have.