Giter VIP home page Giter VIP logo

bench's Introduction

bench

📊 Daily benchmarks of deno & node & bun HTTP frameworks


Table of Contents

Overview

Hello, bench!

Requests per second

Framework Mean Stddev Max Relative
Bun 80401.06 9928.84 102319.17 100%
Stric 79945.15 9984.05 104531.19 99%
Hyper Express 79465.05 16074.82 101060.99 99%
Elysia 76477.17 14436.89 102021.84 95%
Vixeny (Bun) 75430.21 13441.94 100313.16 94%
Deno 65130.38 11679.63 89531.95 81%
Vixeny (Deno) 54019.72 7308.64 80758.64 67%
Hono 52254.46 6304.73 80087.95 65%
NHttp 51183.18 5433.87 83271.56 64%
Fast 51082.51 4726.80 75101.73 64%
Fastro 49573.60 2647.91 71857.77 62%
Deso 46401.69 2978.38 60327.37 58%
Megalo 46096.04 2291.55 54417.43 57%
Alosaur 45175.81 2990.23 58644.51 56%
http 43876.37 4934.06 53760.24 55%
Cheetah 42195.84 2608.45 50490.44 52%
Router 41241.38 4256.73 46781.79 51%
Reno 41117.40 2336.71 45906.01 51%
Danet V2 (Hono) 35337.07 2429.65 40715.37 44%
Aqua 33708.50 3541.42 39496.35 42%
Danet (Oak) 33514.74 2243.74 35932.81 42%
Oak 32804.85 3238.14 37010.03 41%
Little 31513.55 4248.33 36983.74 39%
Dinatra 17592.40 2512.74 29706.52 22%
Node 16688.00 1417.73 18405.16 21%
Fastify 15967.84 1608.56 19597.95 20%
Abc 15062.08 2070.99 28778.47 19%
Opine 15023.17 2631.89 20237.41 19%
Express (Deno) 12230.31 2171.87 14171.74 15%
Express 6274.20 1015.49 8033.39 8%
Servest 6256.16 1543.21 10950.56 8%
Acorn 3695.59 2556.47 17264.00 5%
Peko 0.00 0.00 0.00 0%
Chart

Frameworks

A better Deno framework to create web application

A focused RESTful server framework for Deno 🌰🦕

Deno web framework with many decorators

A minimal and fast 🏃 web framework for Deno

Bun is a fast all-in-one JavaScript runtime

🐈 A blazing fast framework for the modern web.

The most mature backend framework for Deno

The most mature backend framework for Deno, V2 in Alpha

A modern runtime for JavaScript and TypeScript

A simple & fast HTTP web framework for Deno

Sinatra like light weight web app framework for deno.

Ergonomic Framework for Humans

Fast, unopinionated, minimalist web framework for Node.js

Fast, unopinionated, minimalist web framework for Node.js, run on Deno

Small web framework with near-native performance.

Fast and low overhead web framework, for Node.js

Fast and simple web application framework for deno

Ultrafast web framework for Cloudflare Workers and Deno. Fast, but not only fast.

The deno standard library http server

High performance Node.js webserver with a simple-to-use API powered by uWebsockets.js under the hood.

A minimalistic connect-like web framework. Automatically works out of the box with Deno Deploy, Deno's Native HTTP and Deno's Standard HTTP server.

Deno HTTP server framework focused on speed

An Simple web-framework for Deno and Friends

Node.js® is a JavaScript runtime built on Chrome's V8 JavaScript engine.

A middleware framework for Deno's native HTTP server, Deno Deploy and Node.js 16.5 and later. It also includes a middleware router.

Fast, minimalist web framework for Deno ported from ExpressJS.

Featherweight server/router framework + middleware and handler library 🐣

A thin, testable routing library designed to sit on top of Deno's standard HTTP module.

The tiny, modern and fast router by the denosaurs for deno and deno deploy. Used by projects like fresh

Stric is a minimalist, fast web framework for Bun.

🌾A progressive http server for Deno🌾

A pure functional web framework

A pure functional web framework

Benchmarks

Hello, bench!

A simple benchmark which expects a response simply containing the text "Hello, Bench!"

Stat Mean Stddev Max
15062.08 2070.99 28778.47
Stat 10 25 50 75 90 95 99
Req/Sec 13377.15 14432.52 15106.21 15819.28 16336.35 16738.99 24055.66
Latency 3ms 3ms 3ms 3ms 3ms 4ms 5ms
Stat Mean Stddev Max
3695.59 2556.47 17264.00
Stat 10 25 50 75 90 95 99
Req/Sec 1909.54 2445.98 2950.63 3921.06 5280.32 7108.64 15629.25
Latency 3ms 8ms 13ms 17ms 21ms 24ms 26ms
Stat Mean Stddev Max
45175.81 2990.23 58644.51
Stat 10 25 50 75 90 95 99
Req/Sec 43032.16 44187.00 45158.87 46157.93 47620.87 49624.77 53711.98
Latency 961µs 1ms 1ms 1ms 1ms 1ms 1ms
Stat Mean Stddev Max
33708.50 3541.42 39496.35
Stat 10 25 50 75 90 95 99
Req/Sec 31555.82 32946.31 34411.13 35472.54 36319.34 36978.05 38007.56
Latency 1ms 1ms 1ms 1ms 1ms 2ms 2ms
Stat Mean Stddev Max
80401.06 9928.84 102319.17
Stat 10 25 50 75 90 95 99
Req/Sec 67548.79 72240.38 80116.55 88436.15 94103.49 97046.05 100089.55
Latency 370µs 460µs 582µs 735µs 929µs 1ms 1ms
Stat Mean Stddev Max
42195.84 2608.45 50490.44
Stat 10 25 50 75 90 95 99
Req/Sec 40227.33 41807.42 42422.72 43190.37 44138.98 44915.88 46354.10
Latency 1ms 1ms 1ms 1ms 1ms 1ms 1ms
Stat Mean Stddev Max
33514.74 2243.74 35932.81
Stat 10 25 50 75 90 95 99
Req/Sec 32984.38 33332.22 33856.32 34306.08 34616.29 34833.03 35120.75
Latency 1ms 1ms 1ms 1ms 1ms 1ms 1ms
Stat Mean Stddev Max
35337.07 2429.65 40715.37
Stat 10 25 50 75 90 95 99
Req/Sec 34607.22 35397.27 35711.16 36210.13 36517.95 36674.84 37041.90
Latency 1ms 1ms 1ms 1ms 1ms 1ms 1ms
Stat Mean Stddev Max
65130.38 11679.63 89531.95
Stat 10 25 50 75 90 95 99
Req/Sec 52738.96 54283.64 62703.68 75467.35 82544.03 85373.33 87969.56
Latency 527µs 578µs 781µs 933µs 1ms 1ms 1ms
Stat Mean Stddev Max
46401.69 2978.38 60327.37
Stat 10 25 50 75 90 95 99
Req/Sec 44048.06 45089.66 46056.81 47785.12 49565.94 51170.66 54028.55
Latency 966µs 1ms 1ms 1ms 1ms 1ms 1ms
Stat Mean Stddev Max
17592.40 2512.74 29706.52
Stat 10 25 50 75 90 95 99
Req/Sec 15525.58 16831.52 18043.24 19027.62 19589.91 19981.26 21123.29
Latency 2ms 2ms 2ms 2ms 3ms 3ms 5ms
Stat Mean Stddev Max
76477.17 14436.89 102021.84
Stat 10 25 50 75 90 95 99
Req/Sec 58520.92 62439.79 76169.37 90216.37 95737.60 97608.00 100220.08
Latency 380µs 468µs 597µs 801µs 975µs 1ms 1ms
Stat Mean Stddev Max
6274.20 1015.49 8033.39
Stat 10 25 50 75 90 95 99
Req/Sec 4839.63 5922.74 6433.67 6709.39 7685.38 7869.28 7968.35
Latency 6ms 7ms 7ms 8ms 9ms 11ms 14ms
Stat Mean Stddev Max
12230.31 2171.87 14171.74
Stat 10 25 50 75 90 95 99
Req/Sec 8599.33 12409.17 12993.53 13353.95 13464.98 13522.90 13888.85
Latency 3ms 3ms 4ms 4ms 4ms 5ms 9ms
Stat Mean Stddev Max
51082.51 4726.80 75101.73
Stat 10 25 50 75 90 95 99
Req/Sec 48213.42 49153.61 50077.46 51030.39 55342.80 61635.06 69740.97
Latency 827µs 913µs 996µs 1ms 1ms 1ms 1ms
Stat Mean Stddev Max
15967.84 1608.56 19597.95
Stat 10 25 50 75 90 95 99
Req/Sec 15428.06 15801.60 16277.36 16607.82 16860.69 17008.49 17498.62
Latency 2ms 2ms 3ms 3ms 3ms 3ms 6ms
Stat Mean Stddev Max
49573.60 2647.91 71857.77
Stat 10 25 50 75 90 95 99
Req/Sec 47915.79 48727.86 49561.72 50247.36 51104.82 51971.95 59404.19
Latency 880µs 935µs 1ms 1ms 1ms 1ms 1ms
Stat Mean Stddev Max
52254.46 6304.73 80087.95
Stat 10 25 50 75 90 95 99
Req/Sec 47577.02 48630.08 49958.00 55066.42 61606.30 65602.50 71573.89
Latency 647µs 889µs 987µs 1ms 1ms 1ms 1ms
Stat Mean Stddev Max
43876.37 4934.06 53760.24
Stat 10 25 50 75 90 95 99
Req/Sec 39599.04 42706.91 45144.30 46418.72 47601.29 48396.54 50376.61
Latency 840µs 1ms 1ms 1ms 1ms 1ms 2ms
Stat Mean Stddev Max
79465.05 16074.82 101060.99
Stat 10 25 50 75 90 95 99
Req/Sec 56679.49 62558.14 84099.14 94036.36 97030.72 98745.99 100156.27
Latency 368µs 459µs 574µs 756µs 951µs 1ms 1ms
Stat Mean Stddev Max
31513.55 4248.33 36983.74
Stat 10 25 50 75 90 95 99
Req/Sec 29115.50 31093.61 32479.37 33588.78 34521.48 35069.05 36036.40
Latency 1ms 1ms 1ms 1ms 1ms 2ms 3ms
Stat Mean Stddev Max
46096.04 2291.55 54417.43
Stat 10 25 50 75 90 95 99
Req/Sec 44721.89 45437.79 46275.66 46943.46 47602.12 48394.91 50409.33
Latency 949µs 1ms 1ms 1ms 1ms 1ms 1ms
Stat Mean Stddev Max
51183.18 5433.87 83271.56
Stat 10 25 50 75 90 95 99
Req/Sec 48164.20 49033.44 50068.09 51098.53 54950.77 62604.23 75698.36
Latency 810µs 908µs 994µs 1ms 1ms 1ms 1ms
Stat Mean Stddev Max
16688.00 1417.73 18405.16
Stat 10 25 50 75 90 95 99
Req/Sec 16247.59 16594.79 16889.51 17188.77 17472.06 17671.00 18120.58
Latency 2ms 2ms 2ms 2ms 3ms 3ms 5ms
Stat Mean Stddev Max
32804.85 3238.14 37010.03
Stat 10 25 50 75 90 95 99
Req/Sec 32237.32 32926.90 33339.57 33900.68 34296.15 34450.36 34919.44
Latency 1ms 1ms 1ms 1ms 1ms 1ms 2ms
Stat Mean Stddev Max
15023.17 2631.89 20237.41
Stat 10 25 50 75 90 95 99
Req/Sec 12510.40 14584.55 15598.97 16164.89 17016.09 18316.04 19655.39
Latency 1ms 3ms 3ms 3ms 3ms 4ms 6ms
Stat Mean Stddev Max
0.00 0.00 0.00
Stat 10 25 50 75 90 95 99
Req/Sec 0.00 0.00 0.00 0.00 0.00 0.00 0.00
Latency 0ms 0ms 0ms 0ms 0ms 0ms 0ms
Stat Mean Stddev Max
41117.40 2336.71 45906.01
Stat 10 25 50 75 90 95 99
Req/Sec 39197.39 40822.68 41403.28 42108.62 42956.10 43487.73 44318.74
Latency 1ms 1ms 1ms 1ms 1ms 1ms 1ms
Stat Mean Stddev Max
41241.38 4256.73 46781.79
Stat 10 25 50 75 90 95 99
Req/Sec 38502.62 40235.36 42311.59 43430.23 44211.20 44810.04 45714.87
Latency 881µs 1ms 1ms 1ms 1ms 1ms 2ms
Stat Mean Stddev Max
79945.15 9984.05 104531.19
Stat 10 25 50 75 90 95 99
Req/Sec 66939.90 71701.52 79135.62 87783.32 94025.56 96769.27 100437.09
Latency 372µs 463µs 586µs 741µs 933µs 1ms 1ms
Stat Mean Stddev Max
6256.16 1543.21 10950.56
Stat 10 25 50 75 90 95 99
Req/Sec 4933.81 5639.30 6367.53 7021.10 7943.72 8524.56 9139.81
Latency 6ms 6ms 7ms 8ms 9ms 11ms 15ms
Stat Mean Stddev Max
75430.21 13441.94 100313.16
Stat 10 25 50 75 90 95 99
Req/Sec 58220.31 62663.15 74951.12 88310.33 93491.42 95449.21 98297.78
Latency 385µs 475µs 605µs 812µs 989µs 1ms 1ms
Stat Mean Stddev Max
54019.72 7308.64 80758.64
Stat 10 25 50 75 90 95 99
Req/Sec 48730.49 49691.27 50995.91 56876.40 65551.20 70141.91 76703.93
Latency 613µs 854µs 960µs 1ms 1ms 1ms 1ms

Generated 2024-05-05T01:33:28.518Z

bench's People

Contributors

actions-user avatar andreespirela avatar aquapi avatar artursharapov avatar boywithkeyboard avatar danteissaias avatar dougg0k avatar ebebbington avatar eliassjogreen avatar evergreen-abandoned-jw avatar gianpaj avatar github-actions[bot] avatar gmbodhi avatar gothammm avatar gr7d avatar grian32 avatar guergeiro avatar herudi avatar jamesseanwright avatar kravetsone avatar lino-levan avatar mimimonads avatar mrtnvh avatar notfilippo avatar sejori avatar shevernitskiy avatar sorikairox avatar tsar-boomba avatar ynwd avatar yusukebe avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

bench's Issues

Add pogo.

I tried pogo a week ago and I'm curious about its results.

Can you try pogo and update the list, please.

Thank you!

Fund with Polar

More Frameworks

I think it'd be good to see results for Fastify, Express and Fastro, alongside a basic Deno and Node server, just to give even broader results, and it'd be nice to compare them with basic Node and Deno

So in a nutshell, maybe more could be added:

  • Fastify
  • Express
  • Node
  • Fastro
  • Deno

If it helps speed up development time (should you agree with this suggestion), here's the code we've used in Drashland:

// node
const http = require("http");
const port = process.argv[2] || "1447";
console.log("port", port);
http
  .Server((req, res) => {
    res.end("Hello World!");
  })
  .listen(port);

console.log("server started");
// deno
import { serve } from "https://deno.land/[email protected]/http/server.ts";
const s = serve({ port: 1447 });
console.log("http://localhost:1447/");
for await (const req of s) {
  req.respond({ body: "Hello World\n" });
}

console.log("server started");
// fastify
const fastify = require('fastify')()

// Declare a route
fastify.get('/', (request, reply) => {
  return "Hello World!";
})

// Run the server!
fastify.listen(1447);

console.log("server started");
// fastro
import { Fastro } from "https://deno.land/x/[email protected]/mod.ts";

const server = new Fastro();

server.get("/", (req) => req.send("Hello World!"));

server.listen({
  port: 1447
});

console.log("server started");
// express
const express = require('express')
const app = express()
const port = 1447

app.get('/', (req, res) => res.send('Hello World!'))

app.listen(port);

console.log("server started");

(Credit to @crookse for making these benchmarks though, we're going to favour your repository over ours)

Bun is roughly 2x faster than deno

Add another column for average requests per second all frameworks can handle

Funding

  • You can sponsor this specific effort via a Polar.sh pledge below
  • We receive the pledge once the issue is completed & verified
Fund with Polar

Cache Oha

That way we can speed up benchmark CI by ~3 min

`autocannon` is too slow to benchmark Deno or Bun correctly

For many of the results on the homepage, you are benchmarking autocannon. When the HTTP client is slower than the HTTP server, you are benchmarking the HTTP client. That's why the numbers get so close towards the top -- they're within the margin of error for autocannon.

Deno and Bun's numbers will be more accurate (higher) using a tool that is better at keeping up. wrk is also not quite fast enough.

oha would be a more accurate choice, though http_load_test would be best.

Bun is 2x faster than Deno

I have benchmarked Deno a few times on my machine and many benchmarks Deno is 2x slower than Bun
Maybe you can try use another benchmarking tool like wrk or bombardier to see the result.

Funding

  • You can sponsor this specific effort via a Polar.sh pledge below
  • We receive the pledge once the issue is completed & verified
Fund with Polar

Node failed in CI

My fault, and my PR's keep getting in a weird state - don't suppose someone could add the fix for me? the port in node/bare.js needs to be changed to 8000, eg: const port = process.argv[2] || "8000"

Could you add endofunctor?

I would like to know of my new router that it is faster than Hono, could you add it? it's a little faster if you add the host to "hasName"

import fun from "https://deno.land/x/endofunctor/fun.ts";

// I use the default server
// import { serve } from "https://deno.land/[email protected]/http/server.ts";
await Deno.serve(
  fun()([
    {
      path: "/",
      f: (_) => "hello world",
    },
  ]),
  { port: 8000 },
);

please let me know if you have any questions

System Specs

The results can be more useful if you also include your system specifications.

Funding

  • You can sponsor this specific effort via a Polar.sh pledge below
  • We receive the pledge once the issue is completed & verified
Fund with Polar

Fix and add back fastro

Saw the ci failed for fastro, then it was removed but it's still failing

I could probably work on this later, to fix the initial errors and add it back in

More complex benchmarks?

Just responding in plain text "Hello, Bench!" is meaningless in real-world scenarios.

Please considering add some more complex scenarios like parsing query strings, parsing cookies, parsing JSON from request bodies, serializing JSON to response bodies, or even interacting with databases.

Fund with Polar

Graphs

They're cool and make stuff easier to read without memorizing a bunch of different values from the tables

Empty Result Set For Pogo

Check the results for pogo in the README, everything is showing 0. Can confirm this is also present before my add drash back PR (just in case i might have broken something)

[suggestion] Add `h3`

How about adding h3 to the bench?

import { createServer } from "node:http";
import { createApp, eventHandler, toNodeListener } from "h3";

const app = createApp();
app.use(
  "/",
  eventHandler(() => "Hello, Bench!")
);

createServer(toNodeListener(app)).listen(8000);

Funding

  • You can sponsor this specific effort via a Polar.sh pledge below
  • We receive the pledge once the issue is completed & verified
Fund with Polar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.