Benchmarks of JavaScript Package Managers
Last benchmarked at: May 26, 2026, 12:46 AM (daily updated).
This benchmark compares the performance of npm, pnpm, Yarn Classic, and Yarn PnP (check Yarn's benchmarks for any other Yarn modes that are not included here).
Each row's label lists which of cache, lockfile, and node_modules are warm/present before install runs. Quick mapping to the real world (ordered from slowest to fastest scenario):
clean: a brand-new clone — nothing cached, no lockfile, nonode_modules.cache: a developer reinstalling without a lockfile.lockfile: a CI server doing its first install.cache+lockfile: a developer reinstalling a known project.node_modules: the cache and lockfile are deleted and install is run again.cache+node_modules: the lockfile is deleted and install is run again.cache+lockfile+node_modules: re-running install when nothing has changed.lockfile+node_modules: the cache is deleted and install is run again.update: dependency versions are bumped inpackage.jsonand install is run again.
Lots of Files
The app's package.json here
| action | cache | lockfile | node_modules | npm | pnpm | pnpm 🦀 | Yarn | Yarn PnP |
|---|---|---|---|---|---|---|---|---|
| install | 27.6s | 7.3s | 4.7s | 7.1s | 2.9s | |||
| install | ✔ | 10.9s | 3.4s | 1.2s | 6.8s | 2.4s | ||
| install | ✔ | 9.8s | 6.4s | 3.3s | 5.1s | 1.1s | ||
| install | ✔ | ✔ | 7.1s | 2s | 592ms | 5s | 1.1s | |
| install | ✔ | 1.5s | 7.1s | 5.4s | 6.4s | n/a | ||
| install | ✔ | ✔ | 1.5s | 5s | 972ms | 6.4s | n/a | |
| install | ✔ | ✔ | ✔ | 1s | 372ms | 65ms | 4.5s | n/a |
| install | ✔ | ✔ | 1s | 371ms | 64ms | 4.5s | n/a | |
| update | n/a | n/a | n/a | 6.5s | 3.1s | 1.1s | 5.1s | 2.5s |
pnpm vs pnpm 🦀
pnpm v12 will use a new installation engine for fetching and linking written in Rust. See pacquet.
| action | cache | lockfile | node_modules | pnpm | pnpm 🦀 |
|---|---|---|---|---|---|
| install | 7.3s | 4.7s | |||
| install | ✔ | 7.1s | 5.4s | ||
| install | ✔ | 6.4s | 3.3s | ||
| install | ✔ | ✔ | 5s | 972ms | |
| install | ✔ | 3.4s | 1.2s | ||
| install | ✔ | ✔ | 2s | 592ms | |
| install | ✔ | ✔ | ✔ | 372ms | 65ms |
| install | ✔ | ✔ | 371ms | 64ms | |
| update | n/a | n/a | n/a | 3.1s | 1.1s |