8000 GitHub - nhttp/benchmarks: Runtime JS/TS benchmarks (frameworks)
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
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 Jun 21 2025, 1:01:41 AM

Created By : bot_ci

Deno

Name AVG GET / GET /blog/:id GET /api/user
nhttp 60036 65587 61800 52722
hono 57398 62375 59424 50394
fast 52433 58307 46750 52241
oak 27971 29133 27094 27685

Node

Name AVG GET / GET /blog/:id GET /api/user
nhttp 39430 45418 37917 34955
fastify 24707 24610 25791 23719
koa 16930 17029 17091 16670
express 6461 6653 6195 6536

Bun

Name AVG GET / GET /blog/:id GET /api/user
elysia 85136 96264 79968 79175
nhttp 69419 88421 60377 59459
hono 63992 74838 60682 56457
baojs 50536 53293 48689 49625

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

Contributors 2

  •  
  •  
0