We replaced Node.js with Bun for 5x throughput
pier25
29 points
13 comments
April 06, 2026
Related Discussions
Found 5 related stories in 56.5ms across 3,663 title embeddings via pgvector HNSW
- We sped up bun by 100x sdan · 53 pts · April 02, 2026 · 65% similar
- Bun: cgroup-aware AvailableParallelism / HardwareConcurrency on Linux tosh · 41 pts · April 03, 2026 · 52% similar
- Offload: Speed up the agent loop by running tests remotely nvader · 12 pts · March 19, 2026 · 44% similar
- Sandboxing AI agents, 100x faster kentonv · 33 pts · March 24, 2026 · 44% similar
- Npmx: a fast, modern browser for the NPM registry todsacerdoti · 14 pts · March 03, 2026 · 44% similar
Discussion Highlights (7 comments)
ksec
>Next: the runtime itself. Bun has a bun build --compile flag that produces a single self-contained executable. No runtime, no node_modules, no source files needed in the container. I didn't know that. So Bun is basically a whole runtime + framework all in one with little to no deployment headaches?
denys_potapov
tl;dr replace SQLite with Map ~ 2x speed up, replace zod validation with ifs ~ 2x speed up. Bun had a memory leak on unresolved promises - now fixed
dcre
I was curious why bun build --compile would be faster. The docs say: “Compiled executables reduce memory usage and improve Bun’s start time. Normally, Bun reads and transpiles JavaScript and TypeScript files on import and require. This is part of what makes so much of Bun “just work”, but it’s not free. It costs time and memory to read files from disk, resolve file paths, parse, transpile, and print source code. With compiled executables, you can move that cost from runtime to build-time.” https://bun.com/docs/bundler/executables#deploying-to-produc...
abustamam
I use bun for everything except for monorepos with isolated deployment targets and shared packages. I use yarn or pnpm for monorepos. Maybe it's changed in the last six months but I could never get docker to properly resolve my dependencies when I only want to build the web app, for example, since the bun lock is deterministic based off of all the packages in the repo so isolating a single leaf makes it error. Maybe I'm doing something wrong but I scoured docs and online and asked multiple AI agents to no avail.
mememememememo
How much would you get by moving to Go, Rust or C++?
azinman2
So is Bun saying that JSC is much better than v8?
mdavid626
Yeah, right. Replaced sqlite with in memory map. Whoa.. it’s faster now.