Перейти до основного змісту

Benchmarks of JavaScript Package Managers

Last benchmarked at: Jun 2, 2026, 9:03 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, no node_modules.
  • cache: a developer reinstalling without a lockfile.
  • lockfile: a CI server doing its first install.
  • cache+lockfile: a developer reinstalling a known project.
  • cache+node_modules: the lockfile is deleted and install is run again.
  • node_modules: the cache and lockfile are deleted and install is run again.
  • lockfile+node_modules: the cache is deleted and install is run again.
  • cache+lockfile+node_modules: re-running install when nothing has changed.
  • update: dependency versions are bumped in package.json and install is run again.

Lots of Files

The app's package.json here

actioncachelockfilenode_modulesnpmpnpmpnpm 🦀YarnYarn PnP
install27.1s7.8s2.9s8.2s3.4s
install12.3s4.2s1.3s8.1s2.9s
install11s6.8s2.3s6s1.3s
install7.8s2.2s597ms5.8s1.4s
install1.7s3s1.1s7.8sn/a
install1.7s3.5s1.5s7.8sn/a
install1.3s477ms68ms5.6sn/a
install1.2s482ms69ms5.7sn/a
updaten/an/an/a6.6s7.5s2.8s6.3s3s
Graph of the alotta-files results

pnpm vs pnpm 🦀

pnpm v12 will use a new installation engine for fetching and linking written in Rust. See pacquet.

actioncachelockfilenode_modulespnpmpnpm 🦀
install7.8s2.9s
install6.8s2.3s
install4.2s1.3s
install3.5s1.5s
install3s1.1s
install2.2s597ms
install482ms69ms
install477ms68ms
updaten/an/an/a7.5s2.8s
Graph comparing pnpm versions on the alotta-files fixture