Langsung ke konten utama

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, 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.
  • 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 in package.json and install is run again.

Lots of Files

The app's package.json here

actioncachelockfilenode_modulesnpmpnpmpnpm 🦀YarnYarn PnP
install27.6s7.3s4.7s7.1s2.9s
install10.9s3.4s1.2s6.8s2.4s
install9.8s6.4s3.3s5.1s1.1s
install7.1s2s592ms5s1.1s
install1.5s7.1s5.4s6.4sn/a
install1.5s5s972ms6.4sn/a
install1s372ms65ms4.5sn/a
install1s371ms64ms4.5sn/a
updaten/an/an/a6.5s3.1s1.1s5.1s2.5s
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.3s4.7s
install7.1s5.4s
install6.4s3.3s
install5s972ms
install3.4s1.2s
install2s592ms
install372ms65ms
install371ms64ms
updaten/an/an/a3.1s1.1s
Graph comparing pnpm versions on the alotta-files fixture