Bun AOT Shows 2–3x Speed, Half Memory
Bun creator Jarred Sumner reports that Bun’s experimental ahead-of-time compiler can deliver 2–3x faster performance while using less than half the memory of JIT execution. The approach compiles TypeScript and JavaScript to native code before deployment.
Bun AOT could make JavaScript far more competitive for resource-sensitive CLIs, agents, and server workloads, but it remains experimental and carries meaningful tradeoffs.
- –A related Bun benchmark reports 3.7x faster execution, 5.6x lower CPU time, and 2.9x lower memory use versus JIT on one-thread TypeScript workloads. [AOT pull request](https://github.com/oven-sh/bun/pull/45631)
- –Claude Code testing showed lower startup time, CPU, and memory, but nearly doubled executable size—an important deployment cost. [Benchmark report](https://aicodingweekly.news/stories/jarred-sumner-bun-aot-claude-code-267mb-67-subagents)
- –AOT shifts compilation overhead from every process startup into the build pipeline, making it especially attractive for long-running servers and frequently spawned agent subprocesses.
- –Dynamic or weakly typed code may see smaller gains because the compiler relies on inferred runtime shapes and can fall back to slower paths.
- –The feature is not yet a stable default, and portability, binary size, and incomplete multithreading support remain open concerns.
DISCOVERED
1h ago
2026-10-27
PUBLISHED
2h ago
2026-10-27
RELEVANCE
AUTHOR
steipete
