Getting Started

Benchmarking

Performance

The kernel ships with two benchmark suites. Each framework does the same work in both: a chain of pass-through middleware followed by one that responds with OK, or a single middleware that responds with a JSON payload.

  • In-process hands each framework a web Request directly, with no network, using Mitata. It compares Raptor with Hono, H3 and Elysia.
  • HTTP runs each framework on its own server in a separate process and loads it with autocannon. On Node it compares Raptor, with and without lightweight mode, with Hono, H3, Express, Koa and Fastify. On Deno it compares Raptor with Hono, H3 and Elysia.

Elysia and Fastify have no next() style middleware, so each step in their chain is an onRequest hook instead. Elysia compiles its hooks, so a long chain costs it very little.

Results

Requests per second over HTTP on Node 26.13, on an Apple M1. Higher is better.

ScenarioRaptorRaptor (lightweight)HonoH3ExpressKoaFastify
Single middleware69,907114,694112,749110,77860,541105,440124,870
10 middleware60,726100,24394,85486,72654,65991,795120,826
50 middleware47,78664,05451,37054,46142,79461,59786,256
100 middleware36,93147,68336,66237,94942,51849,64282,810
200 middleware26,80230,90123,43825,25628,44034,69157,891
JSON response49,87267,29669,01163,96541,71259,40276,704

Fastify leads every scenario, because it works on Node's own request and response objects rather than the web standard ones. Koa pulls ahead on the longest chains, because it handles an error once at the top, where Raptor handles it at the middleware that raised it.

Running Benchmarks

Fork @raptor-js/kernel, then run any of the suites. Close other busy programs first, since anything else using the CPU skews the results.

npm install
npm run bench            # in-process
npm run bench:http       # over HTTP, on Node
npm run bench:http:deno  # over HTTP, on Deno
© 2026 Raptor