Skip to content

nhttp/benchmarks

Repository files navigation

Runtime JS/TS benchmarks.

Focus on framework features.

Example code for benchmark.

// GET /
framework.get("/", (req, res) => {
  res.send("home");
});

// GET /blog/99?title=bench (params and queryParams)
framework.get("/blog/:id", (req, res) => {
  const data = `${req.params.id} ${req.query.title}`;
  res.send(data);
});

// GET /api/user (set header & send json)
framework.get("/api/user", (req, res) => {
  res.setHeader("x-powered-by", "bench");
  res.json({ user: "john" });
});

Output

Created At : Sat Apr 12 2025, 12:54:22 AM

Created By : bot_ci

Deno

Name AVG GET / GET /blog/:id GET /api/user
hono 59676 64369 59777 54881
nhttp 57560 59938 57958 54783
fast 54713 65324 46220 52594
oak 29004 28877 28954 29180

Node

Name AVG GET / GET /blog/:id GET /api/user
nhttp 38115 45492 35175 33678
fastify 24055 24240 24531 23394
koa 16945 18178 15217 17440
express 6675 6733 6499 6793

Bun

Name AVG GET / GET /blog/:id GET /api/user
elysia 77291 82206 79950 69716
nhttp 69248 93830 60395 53519
hono 66457 74996 63802 60574
baojs 49417 54600 44583 49069

Usage

git clone https://github.com/herudi/deno_benchmark.git
cd deno_benchmark

// for_all
deno task bench

// for_single
deno task bench framework_name

License

MIT

About

Runtime JS/TS benchmarks (frameworks)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published