Benchmarks

Light Validation

Performance benchmarks for an Update Simple User endpoint with Lightweight validation and serialization.

These benchmarks are based on the Fastify benchmarks repo. Our goal is to perform similarly to Fastify as we consider it the industry standard in terms of performance.

Update Simple User benchmark involves light validation and serialization on top of routing and framework overhead.

What is tested?

The test consists of an updateSimpleUser request with a simple User model (~100 bytes payload) that includes:

interface SimpleUser {
  id: number;
  name: string;
  surname: string;
  lastUpdate: Date;
}

// ### mion ###
// the received user by the route is already validated and deserialized
// all Date fields are already JS Date objects (not strings from JSON.parse)
export const routes: Routes = {
  updateUser: (ctx, user: SimpleUser): SimpleUser => {
    user.lastUpdate = new Date();
    return user;
  },
};

// ### Other frameworks (Express, Fastify, Hono, etc.) ###
// Use Zod schemas for validation and date coercion
const UserSchema = z.object({
  id: z.number(),
  name: z.string(),
  surname: z.string(),
  lastUpdate: z.coerce.date(),
});

app.post("/updateUser", function (req, res) {
  const user = UserSchema.parse(req.body); // Validates + deserializes dates
  user.lastUpdate = new Date();
  res.json(user);
});

Notes

We can observe how in this benchmark the requests take more time compared with the 'hello world' benchmark. This is mostly because each request is spending extra time on validation and serialization.

For this specific test, the performance of the libraries used for validation and serialization might be as important than the routing and framework itself.

Why does http-node might top this benchmark? The SimpleUser schema has only 4 fields, so Zod validation does not take much time — this benchmark ends up measuring HTTP handling efficiency rather than validation/serialization. http-node is a bare http.createServer with zero framework overhead and it's fully synchronous handler avoids the microtask scheduling cost that async/await adds to frameworks like Hono bun. Notice that Bun servers only reach ~92-98% CPU utilization versus ~100-109% for http-node, suggesting an I/O or scheduling bottleneck rather than a raw speed advantage.

Benchmarks

  • Machine: darwin arm64 | 12 vCPUs | 16.0GB Mem
  • Node: v24.13.0
  • Run: Wed Apr 15 2026 22:09:47 GMT+0100 (Irish Standard Time)
  • Method: autocannon -c 100 -d 20.10033 -p 1 localhost:3000 (two rounds; one to warm-up, one to measure)

Req (R/s)

Throughput (Mb/s)

Latency (ms)

Max Memory (Mb)

Memory Series (MB)

Results Table

VersionRouterReq (R/s)Latency (ms)Output (Mb/s)Max Memory (Mb)Max Cpu (%)ValidationDescription
elysia.bun1.0.082502.31.1615.8189108Elysia framework with TypeBox validation
hono.bun3.12.679744.71.2015.2871109hono bun server with Zod validation
mion.bun0.6.273772.71.3017.9364108mion using bun, automatic validation and serialization
http-node16.18.059640.91.6314.95136115bare node http server with Zod validation
mion0.6.255432.81.7615.96142101Automatic validation and serialization out of the box
fastify5.7.441002.82.4110.32254125Fastify with native JSON Schema validation
express5.2.140209.32.4310.08173108Express with Zod validation
hapi21.4.435953.52.759.01223110Hapi with Zod validation
hono3.12.630677.74.237.251089148hono node server with Zod validation
Benchmarks Repo