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.

MiiaJS (Bun)
43,231
Elysia (Bun)
42,170
Hono (Bun)
39,651
Fastify (Bun)
37,777
MiiaJS (Deno)
36,464
NestJS+Fastify (Bun)
32,716
MiiaJS uWS (Node)
30,142
Hono (Deno)
28,721
Fastify (Node)
26,506
MiiaJS (Node)
25,483
NestJS+Fastify (Node)
25,387
Hono uWS (Node)
20,830
Hono (Node)
19,861
Show full table
FrameworkReq/secLatency (avg)vs leader
MiiaJS (Bun)43,2311.85ms-
Elysia (Bun)42,1701.91ms-2.5%
Hono (Bun)39,6511.88ms-8.3%
Fastify (Bun)37,7772.25ms-12.6%
MiiaJS (Deno)36,4642.15ms-15.7%
NestJS+Fastify (Bun)32,7162.43ms-24.3%
MiiaJS uWS (Node)30,1422.83ms-30.3%
Hono (Deno)28,7213.02ms-33.6%
Fastify (Node)26,5063.28ms-38.7%
MiiaJS (Node)25,4833.42ms-41.1%
NestJS+Fastify (Node)25,3873.44ms-41.3%
Hono uWS (Node)20,8304.30ms-51.8%
Hono (Node)19,8614.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.

MiiaJS (Bun)
38,117
Elysia (Bun)
37,537
Hono (Bun)
36,674
Fastify (Bun)
31,537
MiiaJS (Deno)
29,854
NestJS+Fastify (Bun)
28,489
MiiaJS uWS (Node)
26,860
Hono (Deno)
25,063
MiiaJS (Node)
23,782
Fastify (Node)
22,973
NestJS+Fastify (Node)
21,746
Hono uWS (Node)
19,721
Hono (Node)
18,423
Show full table
FrameworkReq/secLatency (avg)vs leader
MiiaJS (Bun)38,1172.22ms-
Elysia (Bun)37,5372.01ms-1.5%
Hono (Bun)36,6742.34ms-3.8%
Fastify (Bun)31,5372.72ms-17.3%
MiiaJS (Deno)29,8542.91ms-21.7%
NestJS+Fastify (Bun)28,4892.98ms-25.3%
MiiaJS uWS (Node)26,8603.23ms-29.5%
Hono (Deno)25,0633.47ms-34.2%
MiiaJS (Node)23,7823.72ms-37.6%
Fastify (Node)22,9733.88ms-39.7%
NestJS+Fastify (Node)21,7464.12ms-42.9%
Hono uWS (Node)19,7214.56ms-48.3%
Hono (Node)18,4234.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.

MiiaJS uWS (Node)
94,721
MiiaJS (Deno)
94,529
Hono (Deno)
93,858
Hono uWS (Node)
92,343
MiiaJS (Bun)
82,359
Elysia (Bun)
81,264
Hono (Bun)
79,017
Fastify (Bun)
78,527
Fastify (Node)
70,822
Hono (Node)
69,634
MiiaJS (Node)
68,407
NestJS+Fastify (Bun)
67,404
NestJS+Fastify (Node)
63,583
Show full table
FrameworkReq/secLatency (avg)vs leader
MiiaJS uWS (Node)94,7210.27ms-
MiiaJS (Deno)94,5290.29ms-0.2%
Hono (Deno)93,8580.34ms-0.9%
Hono uWS (Node)92,3430.40ms-2.5%
MiiaJS (Bun)82,3590.82ms-13.1%
Elysia (Bun)81,2641.02ms-14.2%
Hono (Bun)79,0170.90ms-16.6%
Fastify (Bun)78,5270.80ms-17.1%
Fastify (Node)70,8221.06ms-25.2%
Hono (Node)69,6341.06ms-26.5%
MiiaJS (Node)68,4071.06ms-27.8%
NestJS+Fastify (Bun)67,4041.09ms-28.8%
NestJS+Fastify (Node)63,5831.07ms-32.9%

POST /json

Parse JSON body, generate UUID, return response.

Elysia (Bun)
86,553
MiiaJS (Bun)
86,435
Hono (Deno)
85,945
Hono (Bun)
85,447
MiiaJS (Deno)
79,420
MiiaJS uWS (Node)
75,451
Hono uWS (Node)
73,926
Fastify (Bun)
53,251
Hono (Node)
48,524
MiiaJS (Node)
47,903
NestJS+Fastify (Bun)
43,339
Fastify (Node)
43,233
NestJS+Fastify (Node)
38,455
Show full table
FrameworkReq/secLatency (avg)vs leader
Elysia (Bun)86,5530.52ms-
MiiaJS (Bun)86,4350.58ms-0.1%
Hono (Deno)85,9450.89ms-0.7%
Hono (Bun)85,4470.59ms-1.3%
MiiaJS (Deno)79,4200.98ms-8.2%
MiiaJS uWS (Node)75,4511.06ms-12.8%
Hono uWS (Node)73,9261.06ms-14.6%
Fastify (Bun)53,2511.22ms-38.5%
Hono (Node)48,5241.58ms-43.9%
MiiaJS (Node)47,9031.68ms-44.7%
NestJS+Fastify (Bun)43,3392.03ms-49.9%
Fastify (Node)43,2332.12ms-50.1%
NestJS+Fastify (Node)38,4552.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

FrameworkVersionTypeRuntimes
MiiaJS0.6.0Decorator-driven, DI, guards, middlewareBun, Deno, Node (+ uWS adapter)
Hono4.13.3Lightweight multi-runtime routerBun, Deno, Node (+ uWS adapter)
Elysia1.4.29Bun-native frameworkBun
Fastify5.12.1Plugin-based Node.js frameworkBun, Node
NestJS+Fastify11.2.1Enterprise decorator frameworkBun, 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.

terminal
$ 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.