Skip to main content
Performance

Benchmarks

Pikku is an abstraction layer — it adds overhead so you can write your functions once and deploy to Express, Fastify, uWS, or any runtime. Here are the real numbers.

Real-World Scenario

Full pipeline: POST with auth + validation

The functions themselves are no-ops — this measures pure framework overhead: body parsing, schema validation, middleware, and permissions checks.

18,302
Pikku + Express
49% overhead · Includes express.json() overhead on all routes
34,394
Pikku + Fastify
22% overhead · Pikku adds routing, middleware, and permissions
66,392
Pikku + uWS
55% overhead · Still handles 66k+ requests per second
43,202
Pikku + Bun
44% overhead · Native Bun HTTP with Pikku abstraction layer
Full Breakdown

Every scenario, side by side

Five test scenarios from minimal to full pipeline. All numbers in requests per second.

bareGET

Minimal — no body, no middleware, no auth

schemaPOST

JSON body parsing with schema validation

middlewareGET

One session middleware layer

fullPOST

Two middleware + permissions + body parsing

paramGET

URL parameter extraction (/items/:id)

Express

Fastify

uWS

Bun

Pure Core Throughput

In-process with fetch()

No network, no HTTP server — just a direct fetch() call into Pikku's core. This isolates the framework overhead from network latency.

155,357
Peak req/s
bare scenario (GET)
0.006ms
Lowest avg latency
bare scenario — pure function speed
Methodology

How we tested

HTTP benchmarks

  • autocannon — 100 connections, 10-second runs, pipelining factor of 10
  • Each runtime tested with identical Pikku function: body parsing, session middleware, permissions check
  • Baselines use the same route logic implemented natively for each framework

fetch() benchmark

  • 1,000 warmup iterations followed by 10,000 measured iterations
  • Direct in-process call — no network overhead, no HTTP server
  • Measures pure Pikku core: routing, middleware, validation, response serialization

Note on Express: The express.json() middleware is added upstream in the Pikku Express adapter (required for POST body parsing). This adds overhead to all routes including GETs, which inflates the Pikku Express numbers slightly compared to the baseline where body parsing is only applied to POST routes.

Write once. Deploy fast.

One function, every runtime. Start building with Pikku in minutes.

$ npm create pikku@latest