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.
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.
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.
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.
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.
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.
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.
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.
We chose real-world TypeScript projects with different dependency profiles to test a wide variety of use cases.
| 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. |