whatisgithub

What is bun-vs-node-sea-startup?

yyx990803/bun-vs-node-sea-startup — explained in plain English

Analysis updated 2026-07-17 · repo last pushed 2026-02-22

47JavaScriptAudience · developerComplexity · 2/5MaintainedSetup · moderate

In one sentence

A benchmark comparing how fast Node.js vs Bun start up when bundled into a single executable file, Bun's bytecode mode wins at ~111ms.

Mindmap

mindmap
  root((repo))
    What it does
      Startup speed benchmark
      Single executable comparison
      Cold start timing
    Tech stack
      Node.js SEA
      Bun compile
      TypeScript
    Use cases
      Choose a runtime for CLI tools
      Compare binary size tradeoffs
      Template for own benchmarks
    Audience
      Developers
      CLI tool builders

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Decide between Node.js and Bun when building a fast, self-contained CLI tool.

USE CASE 2

Compare cold-start times across four packaging approaches before shipping a binary.

USE CASE 3

Adapt the benchmark's tunable workload to test your own application's startup time.

USE CASE 4

Weigh startup speed against binary size when choosing a bundling approach.

What is it built with?

JavaScriptTypeScriptNode.jsBun

How does it compare?

yyx990803/bun-vs-node-sea-startup0xsufi/fable-jailbreakfastify/one-line-logger
Stars474747
LanguageJavaScriptJavaScriptJavaScript
Last pushed2026-02-222026-07-01
MaintenanceMaintainedActive
Setup difficultymoderateeasyeasy
Complexity2/52/52/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Requires both Node.js and Bun installed locally to reproduce the 30-run cold-start comparison.

So what is it?

This repository is a speed test comparing how fast two different JavaScript runtimes, Node.js and Bun, can start up when their code is bundled into a single executable file. If you've ever wished your CLI tool or script started instantly instead of taking a noticeable pause, this benchmark measures which approach wins. The test works by taking a large, realistic TypeScript codebase (500 modules with thousands of functions) and packaging it in four different ways. Two approaches use Node.js's "Single Executable Application" feature, one basic version and one with extra caching turned on. The other two use Bun's built-in compilation, again with and without an optimization called bytecode. Then the benchmark runs each packed-up program 30 times on a cold start (when nothing is cached by the OS) and measures how long it takes to finish. The results show that Bun's bytecode approach is fastest at about 111 milliseconds, while the basic Node.js approach takes around 161 milliseconds. You'd use this repository if you're trying to decide between Node.js and Bun for building fast, self-contained command-line tools, the kind where users download a single binary and run it without needing to install Node first. It answers the practical question: which one actually starts faster in real conditions? The benchmark is careful to be realistic, including different kinds of code patterns (classes, error handling, regex, closures) that mirror what actual applications do. The project is notable because it doesn't just measure raw speed, it also shows the tradeoff with binary size. Bun's fastest option (with bytecode) produces an 83 MB file, while Node.js versions range from 115 to 117 MB. The code is reproducible and tunable, you can adjust how large and complex the test workload is to match your own real-world scenario, making this useful as a template for benchmarking your own applications across both runtimes.

Copy-paste prompts

Prompt 1
Run this benchmark and explain why Bun's bytecode compilation starts faster than Node.js's Single Executable Application feature.
Prompt 2
Help me adapt this benchmark to measure startup time for my own TypeScript CLI tool.
Prompt 3
I need a single-binary CLI tool that starts in under 150ms, based on these results, should I use Bun or Node.js?
Prompt 4
Explain the tradeoff between the 83MB Bun binary and the 115-117MB Node.js binaries in this benchmark.

Frequently asked questions

What is bun-vs-node-sea-startup?

A benchmark comparing how fast Node.js vs Bun start up when bundled into a single executable file, Bun's bytecode mode wins at ~111ms.

What language is bun-vs-node-sea-startup written in?

Mainly JavaScript. The stack also includes JavaScript, TypeScript, Node.js.

Is bun-vs-node-sea-startup actively maintained?

Maintained — commit in last 6 months (last push 2026-02-22).

How hard is bun-vs-node-sea-startup to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is bun-vs-node-sea-startup for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.