---
title: "Behind The Scenes of Bun Install"
description: "Bun's package manager installs dependencies roughly 7× faster than npm, 4× faster than pnpm and 17× faster than yarn because it treats installation as a systems programming problem: the bottleneck on modern NVMe hardware is system call and thread-coordination overhead, not I/O wait. strace benchmarks show bun making ~166k syscalls versus ~1M for npm and ~4M for yarn, with almost no futex contention, because its Zig code calls the kernel directly instead of going through Node's libuv thread pool."
url: "https://swe.quest/articles/behind-the-scenes-of-bun-install-9bbc4e6531f354d4"
canonical: "https://bun.com/blog/behind-the-scenes-of-bun-install"
source: "Bun"
published: "2025-09-10"
difficulty: "medium"
kind: "Deep dive"
reading_minutes: 32
tags: ["javascript","performance","build-systems","zig","operating-systems"]
---

# Behind The Scenes of Bun Install

A post on [Bun](https://swe.quest/sources/bun.md), published 2025-09-10, 32 min read, Deep dive. Original: [https://bun.com/blog/behind-the-scenes-of-bun-install](https://bun.com/blog/behind-the-scenes-of-bun-install)

## Summary

Bun's package manager installs dependencies roughly 7× faster than npm, 4× faster than pnpm and 17× faster than yarn because it treats installation as a systems programming problem: the bottleneck on modern NVMe hardware is system call and thread-coordination overhead, not I/O wait. strace benchmarks show bun making ~166k syscalls versus ~1M for npm and ~4M for yarn, with almost no futex contention, because its Zig code calls the kernel directly instead of going through Node's libuv thread pool. Further gains come from async DNS prefetching via Apple's getaddrinfo\_async\_start on macOS, binary manifest caching with interned strings instead of re-parsing JSON, optimized tarball extraction, OS-native file copying and spreading work across CPU cores.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [JavaScript](https://swe.quest/tags/javascript.md) (Languages)
- [Performance engineering](https://swe.quest/tags/performance.md) (Reliability & operations)
- [Build systems](https://swe.quest/tags/build-systems.md) (Engineering practices)
- [Zig](https://swe.quest/tags/zig.md) (Languages)
- [Operating systems](https://swe.quest/tags/operating-systems.md) (Infrastructure)

## Prerequisites

- npm package management ([easy posts on Engineering management](https://swe.quest/tags/engineering-management.md?difficulty=easy))
- system calls and user/kernel mode ([easy posts on Operating systems](https://swe.quest/tags/operating-systems.md?difficulty=easy))
- Node.js event loop ([easy posts on JavaScript](https://swe.quest/tags/javascript.md?difficulty=easy))

## Keywords

Bun, bun install, npm, pnpm, yarn, libuv, futex, strace

## Related posts

- [Bun v0.5](https://swe.quest/articles/bun-v0-5-b38dde54130b760c.md): Bun · 2023-01-18 · Medium · 7 min read · JavaScript, Runtimes & VMs, Build systems
  Bun v0.5 adds npm workspaces support (installing the Remix monorepo in about 500ms, claimed 28x faster than npm), a Bun.dns lookup API backed by c-ares, node:readline, and socket support via node:net and node:tls that lets database drivers like Postgres.js, mysql2 and node-redis run for the first time.
- [Bun v1.1.3](https://swe.quest/articles/bun-v1-1-3-00e62e32c59d26f7.md): Bun · 2024-04-08 · Medium · 3 min read · JavaScript, Runtimes & VMs, Build systems, Performance engineering
  Bun v1.1.3 makes bun install up to 50% faster on Windows (about 1.6x in a hyperfine benchmark on a Next/SvelteKit project) by parallelizing some file copying and hardlinking.
- [Bun v0.3.0](https://swe.quest/articles/bun-v0-3-0-ce34b4df06ef614a.md): Bun · 2022-12-07 · Medium · 8 min read · JavaScript, Runtimes & VMs, Performance engineering
  Bun v0.3.0 focuses on stability and Node.js/Web API compatibility, cutting memory use 3-5x under load by scheduling garbage collection in coordination with the event loop and speeding up TextEncoder.encodeInto() 3x via simdutf.
- [Bun v1.2.16](https://swe.quest/articles/bun-v1-2-16-2fbfbd468574713c.md): Bun · 2025-06-11 · Medium · 5 min read · JavaScript, Runtimes & VMs
  Bun v1.2.16 fixes 73 issues and adds 119 passing Node.js tests.
- [Bun v1.1.11](https://swe.quest/articles/bun-v1-1-11-e2abf125ea0a0b79.md): Bun · 2024-06-01 · Medium · 9 min read · JavaScript, Runtimes & VMs, Performance engineering, Build systems
  Bun v1.1.11 fixes 36 bugs, makes \`bun update\` write changes to package.json (preserving semver ranges unless \`--latest\`), and fixes incorrect peer dependency hoisting in \`bun install\` that broke packages like ajv and expo.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
