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.5
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) | 37,523 | 2.09ms | - |
| MiiaJS (Deno) | 37,013 | 2.12ms | -1.4% |
| Elysia (Bun) | 36,527 | 2.13ms | -2.7% |
| Fastify (Bun) | 33,885 | 2.50ms | -9.7% |
| Hono (Bun) | 32,014 | 2.55ms | -14.7% |
| NestJS+Fastify (Bun) | 29,965 | 2.82ms | -20.1% |
| MiiaJS uWS (Node) | 29,106 | 2.94ms | -22.4% |
| Hono (Deno) | 28,772 | 3.01ms | -23.3% |
| Fastify (Node) | 25,610 | 3.39ms | -31.7% |
| MiiaJS (Node) | 24,674 | 3.54ms | -34.2% |
| NestJS+Fastify (Node) | 23,741 | 3.74ms | -36.7% |
| Hono uWS (Node) | 20,010 | 4.48ms | -46.7% |
| Hono (Node) | 17,779 | 5.13ms | -52.6% |
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) | 33,361 | 2.46ms | - |
| Elysia (Bun) | 33,013 | 2.58ms | -1.0% |
| MiiaJS (Deno) | 30,309 | 2.88ms | -9.1% |
| Hono (Bun) | 29,368 | 2.93ms | -12.0% |
| Fastify (Bun) | 28,065 | 3.04ms | -15.9% |
| MiiaJS uWS (Node) | 26,496 | 3.27ms | -20.6% |
| NestJS+Fastify (Bun) | 25,415 | 3.47ms | -23.8% |
| Hono (Deno) | 25,008 | 3.48ms | -25.0% |
| MiiaJS (Node) | 22,052 | 4.04ms | -33.9% |
| Fastify (Node) | 21,112 | 4.23ms | -36.7% |
| NestJS+Fastify (Node) | 19,757 | 4.56ms | -40.8% |
| Hono uWS (Node) | 18,356 | 4.96ms | -45.0% |
| Hono (Node) | 13,272 | 7.05ms | -60.2% |
The takeaway: MiiaJS delivers the throughput of a bare router with the architecture of a full framework. In realistic API tests, it matches 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 |
|---|---|---|---|
| Hono (Deno) | 95,946 | 0.25ms | - |
| MiiaJS (Deno) | 95,672 | 0.29ms | -0.3% |
| Hono uWS (Node) | 94,038 | 0.44ms | -2.0% |
| MiiaJS uWS (Node) | 93,130 | 0.50ms | -2.9% |
| MiiaJS (Bun) | 91,917 | 0.39ms | -4.2% |
| Hono (Bun) | 89,287 | 0.46ms | -6.9% |
| Elysia (Bun) | 87,043 | 0.78ms | -9.3% |
| Fastify (Bun) | 84,247 | 0.89ms | -12.2% |
| Fastify (Node) | 78,540 | 1.07ms | -18.1% |
| MiiaJS (Node) | 76,700 | 1.07ms | -20.1% |
| NestJS+Fastify (Node) | 66,052 | 1.06ms | -31.2% |
| NestJS+Fastify (Bun) | 63,423 | 1.13ms | -33.9% |
| Hono (Node) | 61,203 | 1.08ms | -36.2% |
POST /json
Parse JSON body, generate UUID, return response.
Show full table
| Framework | Req/sec | Latency (avg) | vs leader |
|---|---|---|---|
| Elysia (Bun) | 89,179 | 0.50ms | - |
| MiiaJS (Bun) | 86,660 | 0.67ms | -2.8% |
| Hono uWS (Node) | 84,919 | 0.96ms | -4.8% |
| MiiaJS uWS (Node) | 84,819 | 1.02ms | -4.9% |
| MiiaJS (Deno) | 82,036 | 1.00ms | -8.0% |
| Hono (Bun) | 81,235 | 1.05ms | -8.9% |
| Hono (Deno) | 79,814 | 1.00ms | -10.5% |
| MiiaJS (Node) | 50,052 | 1.31ms | -43.9% |
| Fastify (Bun) | 49,695 | 1.36ms | -44.3% |
| Fastify (Node) | 42,171 | 2.15ms | -52.7% |
| NestJS+Fastify (Bun) | 40,537 | 2.12ms | -54.5% |
| NestJS+Fastify (Node) | 36,844 | 2.19ms | -58.7% |
| Hono (Node) | 26,746 | 3.26ms | -70.0% |
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.5
- Bun 1.3.12, Deno 2.7.12, Node.js 24.14.1
Xeon 5218R
- 40 cores / 80 threads @ 2.10 GHz
- 128 GB RAM
- Debian 13 (Trixie)
- Bun 1.3.12, Deno 2.7.12, Node.js 24.14.1
Frameworks compared
| Framework | Type | Runtimes |
|---|---|---|
| MiiaJS | Decorator-driven, DI, guards, middleware | Bun, Deno, Node (+ uWS adapter) |
| Hono | Lightweight multi-runtime router | Bun, Deno, Node (+ uWS adapter) |
| Elysia | Bun-native framework | Bun |
| Fastify | Plugin-based Node.js framework | Bun, Node |
| NestJS+Fastify | Enterprise decorator framework | Bun, Node |
* Hono uWS uses the same @miiajs/uws-server adapter - the difference is pure framework overhead.
Last updated: June 10, 2026.
Node.js: MiiaJS with the uWS adapter outperforms Hono uWS by up to 45% and NestJS+Fastify by up to 34% 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.