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.2
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) | 39,731 | 1.92ms | - |
| Elysia (Bun) | 39,048 | 1.98ms | -1.7% |
| MiiaJS (Deno) | 36,231 | 2.18ms | -8.8% |
| Fastify (Bun) | 35,767 | 2.42ms | -10.0% |
| Hono (Bun) | 34,030 | 2.50ms | -14.3% |
| NestJS+Fastify (Bun) | 31,744 | 2.57ms | -20.1% |
| MiiaJS uWS (Node) | 30,443 | 2.79ms | -23.4% |
| Hono (Deno) | 28,037 | 3.08ms | -29.4% |
| NestJS+Fastify (Node) | 26,839 | 3.23ms | -32.4% |
| MiiaJS (Node) | 26,412 | 3.29ms | -33.5% |
| Fastify (Node) | 25,214 | 3.47ms | -36.5% |
| Hono uWS (Node) | 20,529 | 4.37ms | -48.3% |
| Hono (Node) | 19,626 | 4.59ms | -50.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) | 35,535 | 2.40ms | - |
| Elysia (Bun) | 35,220 | 2.27ms | -0.9% |
| Hono (Bun) | 31,480 | 2.59ms | -11.4% |
| Fastify (Bun) | 29,443 | 2.88ms | -17.1% |
| MiiaJS (Deno) | 29,179 | 2.99ms | -17.9% |
| MiiaJS uWS (Node) | 28,549 | 3.02ms | -19.7% |
| NestJS+Fastify (Bun) | 25,762 | 3.43ms | -27.5% |
| Hono (Deno) | 24,168 | 3.66ms | -32.0% |
| MiiaJS (Node) | 23,471 | 3.77ms | -33.9% |
| Fastify (Node) | 22,838 | 3.90ms | -35.7% |
| NestJS+Fastify (Node) | 21,497 | 4.17ms | -39.5% |
| Hono uWS (Node) | 20,306 | 4.42ms | -42.9% |
| Hono (Node) | 13,729 | 6.78ms | -61.4% |
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) | 98,204 | 0.22ms | - |
| MiiaJS (Bun) | 95,646 | 0.32ms | -2.6% |
| Hono uWS (Node) | 94,313 | 0.40ms | -4.0% |
| MiiaJS (Deno) | 94,099 | 0.29ms | -4.2% |
| Hono (Bun) | 92,541 | 0.37ms | -5.8% |
| MiiaJS uWS (Node) | 91,534 | 0.39ms | -6.8% |
| Fastify (Bun) | 90,563 | 0.51ms | -7.8% |
| Elysia (Bun) | 85,662 | 0.95ms | -12.8% |
| Fastify (Node) | 80,387 | 1.01ms | -18.1% |
| MiiaJS (Node) | 78,044 | 1.05ms | -20.5% |
| NestJS+Fastify (Bun) | 73,734 | 1.07ms | -24.9% |
| NestJS+Fastify (Node) | 70,880 | 1.06ms | -27.8% |
| Hono (Node) | 69,066 | 1.06ms | -29.7% |
POST /json
Parse JSON body, generate UUID, return response.
Show full table
| Framework | Req/sec | Latency (avg) | vs leader |
|---|---|---|---|
| Hono uWS (Node) | 92,336 | 0.45ms | - |
| MiiaJS (Bun) | 91,660 | 0.50ms | -0.7% |
| Hono (Bun) | 88,818 | 0.51ms | -3.8% |
| Elysia (Bun) | 87,498 | 0.53ms | -5.2% |
| MiiaJS uWS (Node) | 85,635 | 0.82ms | -7.3% |
| MiiaJS (Deno) | 82,467 | 0.99ms | -10.7% |
| Hono (Deno) | 74,764 | 1.03ms | -19.0% |
| MiiaJS (Node) | 55,672 | 1.16ms | -39.7% |
| Fastify (Bun) | 52,537 | 1.21ms | -43.1% |
| NestJS+Fastify (Bun) | 43,173 | 2.02ms | -53.2% |
| Fastify (Node) | 43,155 | 2.11ms | -53.3% |
| NestJS+Fastify (Node) | 39,984 | 2.20ms | -56.7% |
| Hono (Node) | 25,423 | 3.55ms | -72.5% |
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.2
- 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: April 10, 2026.
Node.js: MiiaJS with the uWS adapter outperforms Hono uWS by up to 48% and NestJS+Fastify by up to 33% 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.