Volt v0.1 · TypeScript APIs on Bun · Get started

Performance reference

Benchmarks you can reproduce

Compare equivalent work and publish the environment and raw results with every measurement. This page provides the checked-in commands and their scope; it does not report live telemetry.

Run the checked-in harness

Run from the repository root after installing workspace dependencies:

bash
bun install --frozen-lockfile
bun --version
node --version
bun run bench
bun run bench:compare
bun run bench:all

What each command measures

CommandScope
benchVolt in-memory request/handler microbenchmarks
bench:compareVolt in-memory scenarios in benchmarks/runner.ts; not a multi-framework network ranking
bench:allStarts framework servers and measures localhost fetch requests

The network harness uses 10,000 requests and 40 concurrent workers per scenario, with warmup. It measures static GET, dynamic parameters, and validated JSON POST. Inspect benchmarks/all-frameworks.ts and benchmarks/servers for exact endpoints and runtime execution.

Report enough context

Record the commit, dependency lockfile, runtime versions, operating system, CPU, load generator, concurrency, request count, payloads, and error counts. Repeat runs and report variability plus throughput and p50/p95/p99 latency. Measure CPU and memory separately if those matter. Current browser charts are not a live telemetry feed; only published raw runs can substantiate a ranking.

Interpret results

In-memory dispatch omits TCP and client networking. Localhost tests combine client and server load on one machine. Do not compare either directly with production traffic or infer ORM/database throughput from these HTTP scenarios. Use equivalent validation and response work for every framework. Results depend on the scenario and environment; the measured run below is a limited comparison.

Native static route comparison

The performance update includes a separate network benchmark, tested with Bun 1.4.4. From the repository root after installing dependencies:

bash
bun benchmarks/static-native.ts
BENCH_SCENARIO=context bun benchmarks/static-native.ts

The second scenario reads a request header. To include the previous implementation, set BENCH_BASELINE to the core index.ts in a separately installed checkout. The harness compares Volt's native and JavaScript dispatchers with Elysia in separate server processes, rotates order across five repetitions, warms up for one second, and measures for two seconds at concurrency 30. The client and servers share a machine. It checks response payloads and records errors, throughput and p99 latency.

In GitHub Actions run 40403157366, median throughput on Ubuntu ARM64 increased from 67,599 to 75,718 requests/second for a static object (+12.0%) and from 59,587 to 64,583 for a header-reading route (+8.4%). On x64 the same scenarios changed by +6.1% and -1.0%; results also varied in another run. All 80 measured cases reported zero errors. These short samples on shared runners do not establish a universal winner; test realistic workloads and report variability. See Application & Server for nativeRoutes defaults and overrides.

Compare framework APIs and learning paths →