Pular para o conteúdo principal

Benchmarks of JavaScript Package Managers

Last benchmarked at: Jul 12, 2026, 5:47 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.
  • 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 in package.json and install is run again.

Lots of Files

The app's package.json here

actioncachelockfilenode_modulesnpmpnpmpnpm 🦀YarnYarn PnP
install22.7s6.5s2.2s6.9s2.7s
install10.8s3.8s1.2s6.7s2.2s
install9.7s5.3s1.8s4.9s1s
install7.1s1.9s599ms4.9s1s
install1.3s423ms41ms6.3sn/a
install1.3s460ms40ms6.2sn/a
install1s381ms12ms4.5sn/a
install1s387ms53ms4.5sn/a
updaten/an/an/a5.1s5.9s1.8s5s2.3s
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 🦀
install6.5s2.2s
install5.3s1.8s
install3.8s1.2s
install1.9s599ms
install460ms40ms
install423ms41ms
install387ms53ms
install381ms12ms
updaten/an/an/a5.9s1.8s
Graph comparing pnpm versions on the alotta-files fixture