For web frameworks on Node, on Deno, and on Bun.

Overview

Web Framework Bench

For web frameworks on Node, on Deno, and on Bun.

Fast is not everything, but fast is everything.

Motivation

There are some benchmark projects for JavaScript web frameworks, but none of them satisfy me. Because one is just measuring "Hello World" and another is for routing. I think we need to measure both "Hello World" and routing and the handling of Responses and Requests.

In this sense, SaltyAom's benchmarks are good. However I wanted to add to that the Deno and Node frameworks. I also thought we should use more complex routing.

Above all, I wanted to make sure that Hono I'm making is fast.

Frameworks

Which frameworks used for this benchmarks, see frameworks.js

End-points

  • GET / - Just returns "Bench" as plain text.
  • GET /posts/123/comments?query=foo - Handles to get path parameters and query parameters, and add x-powered-by to Response headers.
  • POST /posts - Returns the received JSON string into an object, again into a string.

In addition to the above, the following routing is added:

export const routes = [
  { path: '/top', text: 'Top' },
  { path: '/about', text: 'About' },
  { path: '/about/maps', text: 'About Maps' },
  { path: '/about/contact', text: 'About Contact' },
  { path: '/authors', text: 'Authors' },
  { path: '/authors/:name', text: 'Author Name' },
  { path: '/posts', text: 'Posts' },
  { path: '/posts/:id', text: 'Posts Permalink' },
  { path: '/posts/:id/comments/:commentId', text: 'Posts Comment Permalink' },
]

Prerequisites

  • oha
  • Node.js
  • Deno
  • Bun

You should use Deno and Bun as latest possible. For Bun, to upgrade as latest canary release, run the below:

bun upgrade --canary

Run

yarn install
yarn start

It is possible that the version of the framework has been upgraded. If you want to bump up the framework version, run this:

yarn add hono

Results

See the results in the generated results/results.md.

Related Projects

Author

Yusuke Wada https://github.com/yusukebe

License

MIT

You might also like...

zx inspired shell for Bun/Node.

🐚 bnx zx inspired shell for Bun/Node. Install bun add bnx # npm install bnx Usage import { $ } from 'bnx' const list = $`ls -l` const files = list.

Oct 16, 2022

Bun vs Node performance comparison - part 2

Performance Combo Results Platform Req/S Latency (ms) Remix + Express 3291 14 Remix + App Server 3378 15 Remix + Bun 6417 8 Astro + Node 3765 14 Astro

Dec 20, 2022

Run REST APIs in Node.js applications frameworks (Express, Koa, Hapi and Fastify) on top of any Serverless Cloud.

🚀 Serverless Adapter Install | Usage | Support | Architecture | Credits Run REST APIs and other web applications using your existing Node.js applicat

Jan 1, 2023

A small, but powerful HTTP library for Deno & Deno Deploy, built for convenience and simplicity

A small, but powerful HTTP library for Deno & Deno Deploy, built for convenience and simplicity

Wren Wren is a small, but powerful HTTP library for Deno & Deno Deploy, built for convenience and simplicity. convenient aliases for HTTP responses au

Dec 12, 2022

Fast, and friendly Bun web framework

🦊 KingWorld Fast, and friendly Bun web framework. ⚡️ Faster than Express.js by 8.5x on M1 Max Named after my favorite VTuber (Shirakami Fubuki) and c

Jan 4, 2023

Tiny and expressive web framework for Bun.js

Tiny and expressive web framework for Bun.js

Bagel Bagel is a tiny and expressive web framework for Bun.js for building web APIs. Inspired by Express.js and Koa.js. Here we treat Typescript as fi

Nov 25, 2022

This is a simple boilerplate for a Deno website, deployed with Deno Deploy.

Simple Deno Website Boilerplate This is a simple website boilerplate built using Deno and deployed using Deno Deploy. Demo at simple-deno-website-boil

Dec 3, 2022

TypeSafe MongoDB Atlas Data API SDK for Deno & Deno Deploy

Atlas SDK atlas_sdk is a TypeSafe MongoDB Atlas Data API SDK for Deno & Deno Deploy Links Docs Import Replace LATEST_VERSION with current latest versi

Dec 26, 2022

Deno bindings for yoga, using Deno FFI.

deno_yoga Deno bindings for yoga, using Deno FFI. Usage flags: --allow-ffi: Requires ffi access to "yogacore.dll", "libyogacore.so", "libyogacore.dyli

Feb 11, 2022
Owner
Yusuke Wada
Creator of @honojs
Yusuke Wada
Bun-Bakery is a web framework for Bun. It uses a file based router in style like svelte-kit. No need to define routes during runtime.

Bun Bakery Bun-Bakery is a web framework for Bun. It uses a file based router in style like svelte-kit. No need to define routes during runtime. Quick

Dennis Dudek 44 Dec 6, 2022
Opinionated collection of TypeScript definitions and utilities for Deno and Deno Deploy. With complete types for Deno/NPM/TS config files, constructed from official JSON schemas.

Schemas Note: You can also import any type from the default module, ./mod.ts deno.json import { type DenoJson } from "https://deno.land/x/[email protected]

deno911 2 Oct 12, 2022
Grupprojekt för kurserna 'Javascript med Ramverk' och 'Agil Utveckling'

JavaScript-med-Ramverk-Laboration-3 Grupprojektet för kurserna Javascript med Ramverk och Agil Utveckling. Utvecklingsguide För information om hur utv

Svante Jonsson IT-Högskolan 3 May 18, 2022
Hemsida för personer i Sverige som kan och vill erbjuda boende till människor på flykt

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

null 4 May 3, 2022
Kurs-repo för kursen Webbserver och Databaser

Webbserver och databaser This repository is meant for CME students to access exercises and codealongs that happen throughout the course. I hope you wi

null 14 Jan 3, 2023
A zero-dependency, strongly-typed web framework for Bun, Node and Cloudflare workers

nbit A simple, declarative, type-safe way to build web services and REST APIs for Bun, Node and Cloudflare Workers. Examples See some quick examples b

Simon Sturmer 16 Sep 16, 2022
Connect Web Integration illustrates the integration of Connect-Web in various JS frameworks and tooling

Connect Web Integration Connect Web Integration is a repository of example projects using Connect-Web with various JS frameworks and tooling. It provi

Buf 43 Dec 29, 2022
Macaron is an open-source design tool to visually create Web Components, which can be used in most Web frameworks, or in vanilla HTML/JavaScript

Macaron is an open-source design tool to visually create Web Components, which can be used in most Web frameworks, or in vanilla HTML/JavaScript

Macaron 334 Dec 29, 2022
Examples and challenges of my video about Creating and testing a complete Node.js Rest API (Without frameworks)

Building a complete Node.js WebApi + testing with no frameworks Welcome, this repo is part of my youtube video about Creating and testing a complete N

Erick Wendel 120 Dec 23, 2022
🛣️ A tiny and fast http request router designed for use with deno and deno deploy

Rutt Rutt is a tiny http router designed for use with deno and deno deploy. It is written in about 200 lines of code and is pretty fast, using an exte

Denosaurs 26 Dec 10, 2022