-
Regarding its performance, the Bun maintainers provide an example benchmark running an HTTP handler that renders a server-side page with React. This resulted in Bun handling about 68,000 requests per second compared to about 29,000 and 14,000 for Deno and Node.js, respectively. That's quite a difference. Jarred Sumner regularly provides updates on the development of Bun along with recent benchmarks on Twitter so be sure to follow him to keep up to date with it all.
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
-
Additional features for Bun include a transpiler and package manager. As hinted at in the name, it also includes bundling features, giving you the functionality that would otherwise require another tool, such as Snowpack or rollup.js. It also has a dead code elimination feature through its JavaScript minifier.
-
Deno also has a tooling ecosystem around it to enable developers to jumpstart their projects. Fresh is a web framework built for Deno and Lume is their static site generator.
-
Deno also has a tooling ecosystem around it to enable developers to jumpstart their projects. Fresh is a web framework built for Deno and Lume is their static site generator.
-
Let’s get right to the point, Bun wins. We learned earlier about its performance capabilities regarding how many requests per second it can handle, which is quite impressive. It's a similar story when it comes to database operations. Average queries per second when loading the Northwind database for SQLite using Bun’s benchmark sample are as follows:
-
import { serve } from "https://deno.land/[email protected]/http/server.ts"; const handler = async (_request: Request): Promise => { const resp = await fetch("https://api.github.com/users/denoland", { // The init object here has an headers object containing a // header that indicates what type of response we accept. // We're not specifying the method field since by default // fetch makes a GET request. headers: { accept: "application/json", }, }); return new Response(resp.body, { status: resp.status, headers: { "content-type": "application/json", }, }); }; serve(handler);
-
Node.js has recently introduced some features to bring it more in line with Deno's and Bun's capabilities. It now has a built-in test runner, and built-in TypeScript support is under active discussion.
-
denoify
🦕For NPM module authors that would like to support Deno but do not want to write and maintain a port.
If you’re building packages/libraries for the community to use you can take a look at Denoify. It’s a project that aims to change some of your files automatically when migrating and make it easier to maintain the project for both npm and deno.land/x.