2026-05-20 · 4 min
bun install vs npm install di Astro 5 — benchmark real dari laptop di Lippo
Saya jalanin benchmark ini dari MacBook Air M2 (16GB RAM) di rumah di Lippo Karawaci. Project: Astro 5 fresh install + @astrojs/sitemap, @astrojs/mdx, unocss, gsap, lenis — total 12 dependencies.
Cold install (fresh, no cache)
| Tool | Time | Notes |
|---|---|---|
npm install | 18.4s | Default behavior |
pnpm install | 8.2s | Symlinked store |
bun install | 1.9s | Native, parallel |
Warm install (cache populated)
| Tool | Time |
|---|---|
npm install | 4.1s |
pnpm install | 1.3s |
bun install | 0.6s |
Caveat: lockfile format
bun.lockb adalah binary, gak bisa di-diff di GitHub PR review. Untuk team kerjaan, ini bisa bikin reviewer susah liat dependency changes. Workaround: bun install --print atau migrasi ke bun.lock text format (Bun 1.2+).
Verdict
Untuk solo dev / prototyping Astro: pakai bun, hidup lebih cepat. Untuk team dengan strict PR review: pertimbangkan bun.lock text format atau tetap pnpm.
# Migrasi ke text lockfile
bun install --save-text-lockfile
Semua benchmark di atas reproducible — repo di github.com/[user]/astro-bun-bench (placeholder, ganti ke repo real).