pnpm 12 vs Bun 1.4: Both in Rust Now, and Each Wins a Different Install

📅 November 17, 2026 ⏱ 10 min read
pnpm 12 vs Bun 1.4: Both in Rust Now, and Each Wins a Different Install

The 60-second version of this test. Subscribe on YouTube

pnpm 12 is a rewrite of pnpm in Rust. The release post says it keeps pnpm 11’s commands, settings and lockfile format, and on npm the latest tag now points to 12.21.0, published on November 13. So the next npm i -g pnpm on a fresh machine gets the Rust version.

Bun has been the speed reference for package installs since its first release, and Bun 1.4 is written in Rust as well (Bun’s post). The obvious question is which one installs faster now. The public numbers don’t answer it. Socket’s write-up of Vercel’s benchmark compared pnpm 12 only with pnpm 10, and it notes that pnpm removed Bun and Yarn from its own benchmark page after fixing problems in its setup.

So I ran it myself: the same real application, the same machine, four install scenarios, both tools interleaved run by run. The answer splits in two.

The Setup

  • Machine: a 4 vCPU cloud container (Intel Xeon @ 2.10 GHz, 15 GB RAM, ext4 disk), Linux x86-64.
  • pnpm 12.21.0, the native @pnpm/exe.linux-x64 binary called directly, with no Node.js wrapper.
  • Bun 1.4.4 (bun install, default hoisted linker, plus a second round with --linker isolated).
  • Baseline: pnpm 11.28.12, the last JavaScript pnpm, run on Node.js 22.23.4.
  • The app: the package.json of Outline, the open-source wiki, at commit b73fd50 (November 17, 2026). That’s 214 dependencies and 68 devDependencies: Koa, React 19, Sequelize, ProseMirror, the AWS SDK, Vite, Vitest. Outline uses Yarn, so neither tool gets a home advantage. I kept only name, version, dependencies and devDependencies, and dropped the Yarn-specific resolutions block.
  • Each tool has its own cache folder (--store-dir and --cache-dir for pnpm, BUN_INSTALL_CACHE_DIR for Bun), on the same disk as the project so hard links work.
  • Lifecycle scripts are off on both sides (--ignore-scripts), so I’m timing the package manager, not node-gyp.

Each tool generated its own lockfile once, and every lockfile scenario installs from it with --frozen-lockfile. Bun installed 1,630 packages. 275 of the 282 direct dependencies resolved to the same version on both sides. The other 7 (five @aws-sdk/* packages, prosemirror-transform and @firecrawl/pdf-inspector) got a newer patch or minor release on Bun’s side, because those versions were published in the few minutes between the two resolutions. After every install I loaded react and koa from the result to check that node_modules actually worked.

The four scenarios:

ScenarioLockfileCachenode_modulesReal-world case
FreshnoemptynoFirst install on a new project
ColdyesemptynoCI without a cache, new laptop
WarmyesfullnoCI with a restored cache, rm -rf node_modules
No-opyesfullyesRunning install again “just in case”

The harness, trimmed. It times each install and reads the process’s peak memory from os.wait4():

import os, time, shutil, subprocess

def run(cmd, work, env, wipe_cache, cache_dir):
    if wipe_cache:
        shutil.rmtree(cache_dir, ignore_errors=True)
    os.sync(); time.sleep(8)          # let the previous run's deletes settle
    t0 = time.perf_counter()
    p = subprocess.Popen(cmd, cwd=work, env=env, stdout=subprocess.DEVNULL)
    _, status, usage = os.wait4(p.pid, 0)
    assert status == 0
    return time.perf_counter() - t0, usage.ru_maxrss / 1024   # seconds, MB

The commands:

# pnpm 12 (native binary) and pnpm 11 (node pnpm.cjs), same flags
pnpm install --frozen-lockfile --ignore-scripts \
  --store-dir "$CACHE/store" --cache-dir "$CACHE/meta"

# Bun 1.4.4
BUN_INSTALL_CACHE_DIR="$CACHE" bun install --frozen-lockfile --ignore-scripts

The 8-second pause matters. Without it, my first warm round got slower with every run, because each run starts by deleting a 1,600-package node_modules folder and the disk was still busy with it when the next install began. Warm and no-op rounds have one discarded warm-up run, then 7 measured runs. Cold and fresh rounds download everything from registry.npmjs.org, so I ran 5 and 3. The tool order alternates every run, so a slow moment on the network doesn’t always hit the same tool.

Round 1: Cold Installs, pnpm 12 Wins

Empty cache, everything comes over the network.

Scenariopnpm 12.21Bun 1.4.4pnpm 11.28
Cold, with lockfile (median of 5)8.45 s14.30 s14.71 s
Range6.31–10.56 s11.09–14.64 s13.62–16.87 s
Fresh, no lockfile (median of 3)10.45 s17.31 s20.14 s
Range8.38–10.89 s14.83–18.57 s19.52–21.88 s

This was the surprise. In both rounds, every pnpm 12 run beat every Bun run: about 1.7x faster cold, with and without a lockfile.

It costs memory, though. pnpm 12 peaked at 1,016 MB on the cold install and 1,501 MB on the fresh one. Bun peaked at 260 MB and 383 MB. The JavaScript pnpm 11 was in between on time and close to pnpm 12 on memory (944 MB and 1,264 MB). I didn’t profile why pnpm 12 is faster here, so I won’t guess.

One honest caveat: these rounds measure my network as much as the tools. In an earlier 3-run cold batch, with a 3-second pause between runs instead of 8, the spread was much wider and one Bun run finished in 6.1 s. The medians pointed the same way, but on your network the gap could be smaller or larger.

Round 2: Warm Cache, Bun Wins

The cache is full, node_modules is gone. This is the CI job that restores a cache, and the developer who deletes node_modules to fix something.

Warm install (median of 7)TimeRangePeak memory
Bun 1.4.40.40 s0.36–0.44 s20 MB
Bun 1.4.4 --linker isolated0.42 s0.36–0.56 s21 MB
pnpm 12.211.24 s1.05–1.97 s367 MB
pnpm 11.283.68 s3.13–4.27 s476 MB

Bun builds a working node_modules for 1,630 packages in 0.4 seconds, 3.1x faster than pnpm 12, and it does it in 20 MB of memory. That number looked wrong to me, so I checked it a second way, by polling VmHWM in /proc/<pid>/status during a run: 20.5 MB, 7 threads, no child processes.

The --linker isolated row is the fairer comparison, because it gives Bun pnpm’s layout: packages in a hidden store folder, with symlinks, and no phantom dependencies. It costs Bun almost nothing, 0.42 s against 0.40 s. So the layout doesn’t explain pnpm’s gap.

pnpm 12 is still 3x faster than pnpm 11 here. If you upgrade pnpm and change nothing else, your cached CI installs get about 2.4 seconds shorter on an app this size.

Round 3: No-op Install, Bun Wins Again

Everything is already installed. Run install again.

No-op install (median of 7)TimeRangePeak memory
Bun 1.4.40.055 s0.050–0.072 s20 MB
Bun 1.4.4 --linker isolated0.051 s0.046–0.062 s21 MB
pnpm 12.210.214 s0.165–0.243 s119 MB
pnpm 11.280.643 s0.605–0.725 s160 MB

Bun is about 4x faster than pnpm 12. In an earlier 5-run round with a 3-second pause, pnpm 12 measured 0.108 s and Bun 0.070 s, so the exact gap moves, but the order never did. Both are fast enough that you won’t feel it by hand. You’d feel it in a pre-run check that calls install before every script.

Disk Usage: A Tie

With everything installed, I measured the cache and node_modules together with a single du, so hard-linked files count once:

Cache + node_modules
Bun 1.4.41.2 GB
pnpm 12.211.3 GB
pnpm 11.281.4 GB

On ext4, both tools hard-link from their cache into the project, so a second project that uses the same packages costs very little extra on either side. This is not a reason to pick one.

The Comparison

pnpm 12.21Bun 1.4.4
Cold install, lockfile8.45 s14.30 s
Fresh install, no lockfile10.45 s17.31 s
Warm-cache install1.24 s0.40 s
No-op install0.214 s0.055 s
Peak memory, cold1,016 MB260 MB
Peak memory, warm367 MB20 MB
Lockfilepnpm-lock.yaml v9, same as pnpm 11bun.lock
Needs a JS runtimeNoIt is one
Strict (isolated) layoutDefault--linker isolated (this project defaulted to hoisted)

Where pnpm 12 Wins

Cold installs. CI without a dependency cache, Docker builds that start from an empty layer, new machines. That’s 1.7x in my runs, and it’s also the case where installs take the longest, so the seconds saved are real.

Migration cost: zero. pnpm 12 kept lockfile format 9.0. Both lockfiles I generated, from pnpm 11 and pnpm 12, start with lockfileVersion: '9.0', and pnpm 12 installed this app with the same flags as pnpm 11. Read the breaking changes before upgrading, though: --frozen-lockfile false is gone, and engineStrict now fails some installs that pnpm 11 only warned about.

Workspaces and a stricter layout by default. pnpm’s isolated node_modules, catalog: versions and workspace filtering are why many monorepos use it. Bun has workspaces too, but switching package managers in a large monorepo is a project of its own, and this benchmark doesn’t measure that.

No runtime commitment. pnpm 12 is a standalone binary. Choosing Bun as a package manager also puts a 107 MB runtime on every machine and image, even if you never run code with it.

Where Bun Wins

Anything with a warm cache. Restored CI caches, rm -rf node_modules && install, switching branches. 3x faster than pnpm 12, every run.

Memory. 20 MB instead of 367 MB warm, and 260 MB instead of about 1 GB cold. On a small CI runner or a container with a memory limit, that difference is the one that can fail a build.

Repeated installs. At 55 ms, you can run bun install before every script and not notice it.

You already run Bun. Then the question answers itself.

Decision Table

Your situationPick
Already on pnpmUpgrade to pnpm 12. 1.7x faster cold and 3x faster warm than pnpm 11, same lockfile
CI without a dependency cache, or fresh Docker layerspnpm 12
CI with a cache restore, or runners with little memoryBun
Large pnpm monorepo with catalogs and filterspnpm 12, the switching cost is bigger than the seconds
Already using Bun as a runtimeBun
npm user wondering which to trypnpm 12 if you don’t want a new runtime; Bun if you do

The Verdict

It splits on one thing: is your cache warm? With an empty cache, pnpm 12 won every cold and fresh run, about 1.7x faster than Bun. With a warm cache or an existing node_modules, Bun won every run, 3x to 4x faster, using a fraction of the memory.

On a dev machine, most installs happen with a warm cache, so for the inner loop, Bun is still the fastest installer I’ve measured. But the old idea that Bun beats pnpm everywhere no longer holds. On an empty cache, the Rust pnpm is faster.

The clearest result is the boring one: if you use pnpm, upgrade to 12. It was faster than pnpm 11 in every scenario, by 1.7x to 3x, with the same lockfile and the same commands.

Caveats: one app (282 direct dependencies), one 4-core Linux machine on ext4, lifecycle scripts off, and network rounds that depend on my connection to the npm registry. I didn’t test macOS, where both tools clone files instead of hard-linking them, or a large workspace. If installs matter to your CI bill, time install --frozen-lockfile with both tools on your own lockfile. That takes about five minutes.


More TypeScript tooling clashes:

💡

Enjoying the content? Here are tools I personally use and recommend:

  • 🌐 Hosting: Bluehost — simple hosting for a WordPress or PHP site
  • 🛒 Tech Gear: My Amazon Store — keyboards, monitors, dev tools I use

Purchases through my links help keep this blog ad-free 💙

Enjoyed this post?

Every clash gets a video: two tools, one real task, a measured winner.

▶ Subscribe on YouTube 🎬 All videos