Awesome
The benchmarks are now available on the pnpm website.
The code that generates the benchmarks was moved here.
Benchmarks of JavaScript Package Managers
This benchmark compares the performance of npm, pnpm and Yarn (both regular and PnP variant).
Here's a quick explanation of how these tests could apply to the real world:
clean install
: How long it takes to run a totally fresh install: no lockfile present, no packages in the cache, nonode_modules
folder.with cache
,with lockfile
,with node_modules
: After the first install is done, the install command is run again.with cache
,with lockfile
: When a repo is fetched by a developer and installation is first run.with cache
: Same as the one above, but the package manager doesn't have a lockfile to work from.with lockfile
: When an installation runs on a CI server.with cache
,with node_modules
: The lockfile is deleted and the install command is run again.with node_modules
,with lockfile
: The package cache is deleted and the install command is run again.with node_modules
: The package cache and the lockfile is deleted and the install command is run again.update
: Updating your dependencies by changing the version in thepackage.json
and running the install command again.
Lots of Files
The app's package.json
here
action | cache | lockfile | node_modules | npm | pnpm | Yarn | Yarn PnP |
---|---|---|---|---|---|---|---|
install | 51s | 14.4s | 39.1s | 29.1s | |||
install | ✔ | ✔ | ✔ | 5.4s | 1.3s | 707ms | n/a |
install | ✔ | ✔ | 10.9s | 3.9s | 11s | 1.8s | |
install | ✔ | 33.4s | 6.5s | 26.5s | 17.2s | ||
install | ✔ | 28.3s | 11.8s | 23.3s | 14.2s | ||
install | ✔ | ✔ | 4.6s | 1.7s | 22.1s | n/a | |
install | ✔ | ✔ | 6.5s | 1.3s | 713ms | n/a | |
install | ✔ | 6.1s | 5.4s | 41.1s | n/a | ||
update | n/a | n/a | n/a | 5.1s | 10.7s | 35.4s | 28.3s |