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.

MiiaJS (Bun)
37,523
MiiaJS (Deno)
37,013
Elysia (Bun)
36,527
Fastify (Bun)
33,885
Hono (Bun)
32,014
NestJS+Fastify (Bun)
29,965
MiiaJS uWS (Node)
29,106
Hono (Deno)
28,772
Fastify (Node)
25,610
MiiaJS (Node)
24,674
NestJS+Fastify (Node)
23,741
Hono uWS (Node)
20,010
Hono (Node)
17,779
Show full table
FrameworkReq/secLatency (avg)vs leader
MiiaJS (Bun)37,5232.09ms-
MiiaJS (Deno)37,0132.12ms-1.4%
Elysia (Bun)36,5272.13ms-2.7%
Fastify (Bun)33,8852.50ms-9.7%
Hono (Bun)32,0142.55ms-14.7%
NestJS+Fastify (Bun)29,9652.82ms-20.1%
MiiaJS uWS (Node)29,1062.94ms-22.4%
Hono (Deno)28,7723.01ms-23.3%
Fastify (Node)25,6103.39ms-31.7%
MiiaJS (Node)24,6743.54ms-34.2%
NestJS+Fastify (Node)23,7413.74ms-36.7%
Hono uWS (Node)20,0104.48ms-46.7%
Hono (Node)17,7795.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.

MiiaJS (Bun)
33,361
Elysia (Bun)
33,013
MiiaJS (Deno)
30,309
Hono (Bun)
29,368
Fastify (Bun)
28,065
MiiaJS uWS (Node)
26,496
NestJS+Fastify (Bun)
25,415
Hono (Deno)
25,008
MiiaJS (Node)
22,052
Fastify (Node)
21,112
NestJS+Fastify (Node)
19,757
Hono uWS (Node)
18,356
Hono (Node)
13,272
Show full table
FrameworkReq/secLatency (avg)vs leader
MiiaJS (Bun)33,3612.46ms-
Elysia (Bun)33,0132.58ms-1.0%
MiiaJS (Deno)30,3092.88ms-9.1%
Hono (Bun)29,3682.93ms-12.0%
Fastify (Bun)28,0653.04ms-15.9%
MiiaJS uWS (Node)26,4963.27ms-20.6%
NestJS+Fastify (Bun)25,4153.47ms-23.8%
Hono (Deno)25,0083.48ms-25.0%
MiiaJS (Node)22,0524.04ms-33.9%
Fastify (Node)21,1124.23ms-36.7%
NestJS+Fastify (Node)19,7574.56ms-40.8%
Hono uWS (Node)18,3564.96ms-45.0%
Hono (Node)13,2727.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.

Hono (Deno)
95,946
MiiaJS (Deno)
95,672
Hono uWS (Node)
94,038
MiiaJS uWS (Node)
93,130
MiiaJS (Bun)
91,917
Hono (Bun)
89,287
Elysia (Bun)
87,043
Fastify (Bun)
84,247
Fastify (Node)
78,540
MiiaJS (Node)
76,700
NestJS+Fastify (Node)
66,052
NestJS+Fastify (Bun)
63,423
Hono (Node)
61,203
Show full table
FrameworkReq/secLatency (avg)vs leader
Hono (Deno)95,9460.25ms-
MiiaJS (Deno)95,6720.29ms-0.3%
Hono uWS (Node)94,0380.44ms-2.0%
MiiaJS uWS (Node)93,1300.50ms-2.9%
MiiaJS (Bun)91,9170.39ms-4.2%
Hono (Bun)89,2870.46ms-6.9%
Elysia (Bun)87,0430.78ms-9.3%
Fastify (Bun)84,2470.89ms-12.2%
Fastify (Node)78,5401.07ms-18.1%
MiiaJS (Node)76,7001.07ms-20.1%
NestJS+Fastify (Node)66,0521.06ms-31.2%
NestJS+Fastify (Bun)63,4231.13ms-33.9%
Hono (Node)61,2031.08ms-36.2%

POST /json

Parse JSON body, generate UUID, return response.

Elysia (Bun)
89,179
MiiaJS (Bun)
86,660
Hono uWS (Node)
84,919
MiiaJS uWS (Node)
84,819
MiiaJS (Deno)
82,036
Hono (Bun)
81,235
Hono (Deno)
79,814
MiiaJS (Node)
50,052
Fastify (Bun)
49,695
Fastify (Node)
42,171
NestJS+Fastify (Bun)
40,537
NestJS+Fastify (Node)
36,844
Hono (Node)
26,746
Show full table
FrameworkReq/secLatency (avg)vs leader
Elysia (Bun)89,1790.50ms-
MiiaJS (Bun)86,6600.67ms-2.8%
Hono uWS (Node)84,9190.96ms-4.8%
MiiaJS uWS (Node)84,8191.02ms-4.9%
MiiaJS (Deno)82,0361.00ms-8.0%
Hono (Bun)81,2351.05ms-8.9%
Hono (Deno)79,8141.00ms-10.5%
MiiaJS (Node)50,0521.31ms-43.9%
Fastify (Bun)49,6951.36ms-44.3%
Fastify (Node)42,1712.15ms-52.7%
NestJS+Fastify (Bun)40,5372.12ms-54.5%
NestJS+Fastify (Node)36,8442.19ms-58.7%
Hono (Node)26,7463.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

FrameworkTypeRuntimes
MiiaJSDecorator-driven, DI, guards, middlewareBun, Deno, Node (+ uWS adapter)
HonoLightweight multi-runtime routerBun, Deno, Node (+ uWS adapter)
ElysiaBun-native frameworkBun
FastifyPlugin-based Node.js frameworkBun, Node
NestJS+FastifyEnterprise decorator frameworkBun, 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.

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.