Benchmarks
Fast as thefastest routers
MiiaJS matches the fastest frameworks in realistic API benchmarks - with full middleware, JWT, CORS, and validation enabled - while staying neck-and-neck with bare routers in synthetic tests.
Apple M1 Pro, 32 GB RAM, macOS 26.6.1 · measured August 21, 2026
Realistic API
Full middleware stack - CORS, JWT, routing, body parsing, validation. The way real APIs work.
GET /api/users/:userId/posts/:postId
CORS, JWT verification, nested route params, JSON response.
Show full table
| Framework | Req/sec | Latency (avg) | vs leader |
|---|---|---|---|
| MiiaJS (Bun) | 43,231 | 1.85ms | - |
| Elysia (Bun) | 42,170 | 1.91ms | -2.5% |
| Hono (Bun) | 39,651 | 1.88ms | -8.3% |
| Fastify (Bun) | 37,777 | 2.25ms | -12.6% |
| MiiaJS (Deno) | 36,464 | 2.15ms | -15.7% |
| NestJS+Fastify (Bun) | 32,716 | 2.43ms | -24.3% |
| MiiaJS uWS (Node) | 30,142 | 2.83ms | -30.3% |
| Hono (Deno) | 28,721 | 3.02ms | -33.6% |
| Fastify (Node) | 26,506 | 3.28ms | -38.7% |
| MiiaJS (Node) | 25,483 | 3.42ms | -41.1% |
| NestJS+Fastify (Node) | 25,387 | 3.44ms | -41.3% |
| Hono uWS (Node) | 20,830 | 4.30ms | -51.8% |
| Hono (Node) | 19,861 | 4.53ms | -54.1% |
POST /api/workspaces/:ws/projects/:proj/tasks
CORS, JWT, JSON body, path params, query params, custom headers, UUID, 201 status. The heaviest test.
Show full table
| Framework | Req/sec | Latency (avg) | vs leader |
|---|---|---|---|
| MiiaJS (Bun) | 38,117 | 2.22ms | - |
| Elysia (Bun) | 37,537 | 2.01ms | -1.5% |
| Hono (Bun) | 36,674 | 2.34ms | -3.8% |
| Fastify (Bun) | 31,537 | 2.72ms | -17.3% |
| MiiaJS (Deno) | 29,854 | 2.91ms | -21.7% |
| NestJS+Fastify (Bun) | 28,489 | 2.98ms | -25.3% |
| MiiaJS uWS (Node) | 26,860 | 3.23ms | -29.5% |
| Hono (Deno) | 25,063 | 3.47ms | -34.2% |
| MiiaJS (Node) | 23,782 | 3.72ms | -37.6% |
| Fastify (Node) | 22,973 | 3.88ms | -39.7% |
| NestJS+Fastify (Node) | 21,746 | 4.12ms | -42.9% |
| Hono uWS (Node) | 19,721 | 4.56ms | -48.3% |
| Hono (Node) | 18,423 | 4.95ms | -51.7% |
The takeaway: MiiaJS delivers the throughput of a bare router with the architecture of a full framework. In realistic API tests, it edges out Elysia and outperforms Hono, Fastify, and NestJS on Bun - while offering DI, guards, and middleware they lack or bolt on.
Synthetic
Minimal handlers - pure framework overhead with no middleware. Bare routers have a natural edge here; MiiaJS still ranks among the top.
GET /
Return { "message": "Hello, World!" }. No middleware, no parsing.
Show full table
| Framework | Req/sec | Latency (avg) | vs leader |
|---|---|---|---|
| MiiaJS uWS (Node) | 94,721 | 0.27ms | - |
| MiiaJS (Deno) | 94,529 | 0.29ms | -0.2% |
| Hono (Deno) | 93,858 | 0.34ms | -0.9% |
| Hono uWS (Node) | 92,343 | 0.40ms | -2.5% |
| MiiaJS (Bun) | 82,359 | 0.82ms | -13.1% |
| Elysia (Bun) | 81,264 | 1.02ms | -14.2% |
| Hono (Bun) | 79,017 | 0.90ms | -16.6% |
| Fastify (Bun) | 78,527 | 0.80ms | -17.1% |
| Fastify (Node) | 70,822 | 1.06ms | -25.2% |
| Hono (Node) | 69,634 | 1.06ms | -26.5% |
| MiiaJS (Node) | 68,407 | 1.06ms | -27.8% |
| NestJS+Fastify (Bun) | 67,404 | 1.09ms | -28.8% |
| NestJS+Fastify (Node) | 63,583 | 1.07ms | -32.9% |
POST /json
Parse JSON body, generate UUID, return response.
Show full table
| Framework | Req/sec | Latency (avg) | vs leader |
|---|---|---|---|
| Elysia (Bun) | 86,553 | 0.52ms | - |
| MiiaJS (Bun) | 86,435 | 0.58ms | -0.1% |
| Hono (Deno) | 85,945 | 0.89ms | -0.7% |
| Hono (Bun) | 85,447 | 0.59ms | -1.3% |
| MiiaJS (Deno) | 79,420 | 0.98ms | -8.2% |
| MiiaJS uWS (Node) | 75,451 | 1.06ms | -12.8% |
| Hono uWS (Node) | 73,926 | 1.06ms | -14.6% |
| Fastify (Bun) | 53,251 | 1.22ms | -38.5% |
| Hono (Node) | 48,524 | 1.58ms | -43.9% |
| MiiaJS (Node) | 47,903 | 1.68ms | -44.7% |
| NestJS+Fastify (Bun) | 43,339 | 2.03ms | -49.9% |
| Fastify (Node) | 43,233 | 2.12ms | -50.1% |
| NestJS+Fastify (Node) | 38,455 | 2.17ms | -55.6% |
Methodology
All benchmarks run under controlled conditions with randomized server order to reduce bias. Use the tabs above to compare environments.
Load parameters
- Tool: Autocannon v8+
- Connections: 100 concurrent
- Duration: 30s per pass
- Warmup: 5s (full connections for JIT)
- Passes: 5 (averaged with stddev)
- Workers: 1 (single-threaded, no clustering)
What the API scenarios test
- CORS - origin validation and preflight headers
- JWT - Bearer token extraction and HS256 verification
- Routing - path parameter extraction from nested segments
- Body parsing - JSON deserialization (POST scenarios)
- Query parsing - URL search parameter extraction
- Response - JSON serialization with custom status codes
Test environments
Apple M1 Pro
- 10 cores (8P + 2E)
- 32 GB RAM
- macOS 26.6.1
- Bun 1.4.0, Deno 2.7.12, Node.js 24.19.0
- Measured August 21, 2026
Xeon 5218R
- 40 cores / 80 threads @ 2.10 GHz
- 128 GB RAM
- Debian 13 (Trixie)
- Bun 1.4.0, Deno 2.7.12, Node.js 24.19.0
- Measured August 22, 2026
Frameworks compared
| Framework | Version | Type | Runtimes |
|---|---|---|---|
| MiiaJS | 0.6.0 | Decorator-driven, DI, guards, middleware | Bun, Deno, Node (+ uWS adapter) |
| Hono | 4.13.3 | Lightweight multi-runtime router | Bun, Deno, Node (+ uWS adapter) |
| Elysia | 1.4.29 | Bun-native framework | Bun |
| Fastify | 5.12.1 | Plugin-based Node.js framework | Bun, Node |
| NestJS+Fastify | 11.2.1 | Enterprise decorator framework | Bun, Node |
* Hono uWS uses the same @miiajs/uws-server adapter (uWebSockets.js 20.69.0) - the difference is pure framework overhead.
Node.js: MiiaJS with the uWS adapter outperforms Hono uWS by up to 44% and NestJS+Fastify by up to 23% in realistic API tests on M1 Pro. Same transport - the difference is pure framework overhead.
Why is MiiaJS fast?
Core
- Trie-based router - O(1) static path lookup
- Compile-time pipelines - middleware chains resolved once at startup, not per request
- Sync fast path - zero Promises when handler and middleware are synchronous
- No runtime reflection - native decorators resolve at class definition, no metadata scanning
- Minimal allocations - no wrapper objects between your handler and the runtime
Node.js & uWebSockets adapter
- Lazy Request/Headers proxy - no allocation until accessed
- Body buffering - small payloads bypass ReadableStream overhead
- LightResponse cache - status/body/headers tuple without constructing a real Response
Reproduce
The benchmark suite is open source. The interactive CLI lets you pick scenarios, runtimes, and number of passes.
$ git clone https://github.com/miiajs/benchmarks.git
$ cd benchmarks
$ bun install
$ bun run bench Ready to build
something fast?
Start building in minutes. Open source, MIT licensed.