Benchmarks
Measured runtime and product workloads. Each table identifies its binaries, source, measurement method and execution host.
What is measured
bun --versionbun -e ''bun run(empty script)bun test(one empty test)bun build(small project)bun installoffline (warm cache)- RSS at startup
- RSS after loading node:* modules
requireof node:* modulesimport()of node:* modulesrequireof bun:* modulesBun.servehello + first request- local
fetchlatency (p50) - local
fetchlatency (p99) - local
fetch, sequential throughput requireof fork-only modules (fork only)- Binary size
Thresholds live in bench/aphrody/thresholds.json: a case fails when the runtime median exceeds upstream by more than its ratio and its absolute delta.
Run it yourself
git clone https://github.com/aphrody-labs/bun && cd bun
# runtime binary against the upstream release of the same base version
bun scripts/aphrody/perf-gate.ts --fork ~/.bun/bin/bun --upstream-version 1.4.3 --runs 40 --out tmp/perf
The report is written to tmp/perf/perf-report.md and perf-report.json. The upstream micro-benchmarks of bench/ run with cd bench && bun install && bun run <name>.