Node.js vs Deno and Bun

Beginner · 8 min

How Node, Deno and Bun differ in engine, defaults, compatibility and speed claims, and a practical rule for choosing between them.

Before thisWhat Node.js is and how it runs

Awesome · 8 min

Node.js vs Deno and Bun

The player loads from youtube-nocookie.com when you press play. Nothing reaches YouTube before that.

Taught by AwesomeReport a problem with this video
Not started
Set this lesson's status

What you'll learn

  • Node, Deno and Bun are three runtimes for server-side JavaScript. Node and Deno embed V8; Bun embeds JavaScriptCore, the engine from Safari. They differ in defaults and tooling more than in the language they run.
  • Deno started as a reaction to Node's design (secure by default, TypeScript and web APIs first, URL imports) and then added `package.json` and `node_modules` compatibility in Deno 2. Bun started as a speed play and bundles a runtime, package manager, bundler and test runner in one binary.
  • Node has spent the last few releases absorbing the best ideas of both: `--watch`, `--env-file`, a built-in test runner, `node:sqlite`, a permission model, and running `.ts` files by stripping types. The feature gap that justified switching in 2022 is much smaller now.
  • Benchmarks of hello-world servers say little about your application. Your database, your network and your own code dominate real latency.
  • The default choice for production services is still Node, because of ecosystem depth, hosting support and hiring. Reach for Deno or Bun when a specific feature (permissions, single-binary tooling, startup time) solves a problem you actually have.

Why there are three

Node was designed in 2009. By 2018 its creator, Ryan Dahl, had a public list of things he would do differently: ship a permission system instead of giving every script the full power of the user, treat modules as URLs rather than a folder walk through node_modules, and make the language and web APIs the base instead of an afterthought. Deno is that second attempt. Bun came later with a different goal: be much faster to start and install, and bundle the tools Node leaves to other projects.

All three run JavaScript, so a plain console.log works everywhere. The differences show up in four places.

Engine

Node and Deno both embed V8. Bun embeds JavaScriptCore, the engine from Safari. For most application code you will not notice. You will notice in edge-case performance (one engine can be faster at a given pattern) and in how Bun reimplements Node’s built-in modules on top of its own native code instead of reusing Node’s.

Defaults and tooling

Node Deno Bun
Engine V8 V8 JavaScriptCore
TypeScript Strips types when you run a .ts file Runs TypeScript natively Runs TypeScript natively
Package manager npm (separate) Built-in, reads package.json too Built-in, npm-compatible
Test runner node --test (built in) deno test bun test
Permissions Opt-in --permission model Prompts or flags by default None by default
Single binary Single executable applications deno compile bun build --compile

You can check a few of these claims on your machine. On Node 26.13.1, a file x.ts containing const n: number = 42; console.log(n) runs with plain node x.ts. And node --permission -e "require('fs').readFileSync('/etc/hosts')" fails with ERR_ACCESS_DENIED because the permission model denies file reads unless you grant them. Neither worked in Node a few years ago.

The consequence is that the feature gap which pushed people to Deno and Bun in 2022 has narrowed. Node now has --watch, --env-file, a built-in test runner, node:sqlite, global fetch, and the type stripping above. The running code and built-in test runner lessons cover the ones you will use daily.

Compatibility is the whole game

Most of the JavaScript ecosystem is written for Node: the packages on npm assume process, Buffer, node:fs, CommonJS and a node_modules folder. A runtime that cannot run those packages cannot run most real applications. Deno 2 and Bun both spent their last few releases closing that gap, and both can run a large share of popular npm packages. The remaining failures cluster in packages that touch Node internals, native addons or less common built-ins.

Two practical rules follow:

  1. Check the specific packages you need, not the headline compatibility percentage. A tool that works for ninety-eight percent of packages still fails if you need the other two.
  2. Test on the runtime you will deploy to. “It runs locally under Bun” is no guarantee about a hosting platform’s Node.

Speed claims

Runtime comparison videos love hello-world HTTP benchmarks. They are real measurements of something, but that something is the HTTP parser and the event loop doing no work. In a service, the request is dominated by a database call, an upstream API, or your own logic. If the runtime accounts for three percent of your latency and it gets twice as fast, you have bought a one and a half percent improvement. Startup time and install speed are more tangible: a CLI tool that starts in 20 milliseconds instead of 60 is felt, and so is an install that takes three seconds instead of thirty.

A practical rule

  • Default to Node for production services. It has the deepest ecosystem, the widest hosting and tooling support, and the largest pool of people who can debug it at three in the morning.
  • Consider Deno when you want secure-by-default execution of scripts you did not fully write, or when its standard library and deployment platform fit.
  • Consider Bun when all-in-one tooling or install and startup speed matters, for example scripts, local tooling and test suites.
  • Write portable code anyway. Prefer fetch, URL, crypto.subtle and node:-prefixed imports. It keeps the option open and costs nothing.

The versions move quickly. As of November 2026, npm view deno version reports 2.9.6 and npm view bun version reports 1.4.5, and Node’s current line is 26 (see installing Node and managing versions). Treat any comparison, including this one, as a snapshot.

What the video covers

This video is the most recent one found, published in October 2026, and per its description it gives a quick look at the current JavaScript runtime landscape: Node versus Deno versus Bun, and where the runtimes are heading. It argues an opinion (“Node won”). Its description also makes claims about corporate ownership of Deno and Bun that were not independently checked and that this lesson does not rely on. No transcript was available, so the section above is the neutral version: the comparison table, the compatibility rule and the decision rule are the lesson’s own. Maximilian Schwarzmüller’s older video (2024) is the more even-handed take and is linked under “go deeper”.

Where this fits

Whichever runtime you choose, the rest of this roadmap teaches Node’s APIs, which the others imitate. Next, installing Node and managing versions covers the release lines. For the language-choice question one level up, see choosing a backend language and runtime.

Check yourself

  1. 01Which JavaScript engine does each of Node, Deno and Bun use?

    Node and Deno use V8, the engine in Chrome. Bun uses JavaScriptCore, the engine in Safari. Same language, different engine internals, so performance profiles and some edge-case behaviour differ.

  2. 02Which two features that used to be reasons to choose Deno or Bun now exist in Node?

    Any two of: running TypeScript files directly (type stripping), a built-in test runner (`node --test`), `--watch` to restart on change, `--env-file` to load a `.env` file, a built-in SQLite module, a permission model (`--permission`), and global `fetch`.

  3. 03Why should a framework benchmark that shows one runtime serving 'hello world' twice as fast not decide your choice?

    A real request spends most of its time on database queries, network calls and your own logic, none of which the runtime's HTTP parser speeds up. A 2x gain on a stage that is 3% of total latency is a 1.5% gain overall.

  4. 04What is a reasonable reason to pick Bun or Deno for a new project?

    A concrete need they meet better: Deno's permission flags for running untrusted scripts, Bun's all-in-one tooling and fast startup for scripts and tests, or a platform that deploys one of them natively. Hype or a benchmark chart is not a reason.

Go deeper

Notes

Private to you

Esc
↑↓ navigate↵ open? shortcuts

Keyboard shortcuts

Press Esc to close

Anywhere

⌘K
Search and commands
/
Search
?
This sheet
Esc
Close

Reading a lesson

J
Next lesson
K
Previous lesson
B
Bookmark