{
  "id": 6888916,
  "title": "Bun 1.4's Rust rewrite cuts script startup time from 10.5ms to 4.2ms",
  "url": "https://urgent.news/2026/09/12/bun-1-4s-rust-rewrite-cuts-script-startup-time-from-10-5ms-to-4-2ms",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-09-12T08:00:00.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/alexgeorgiev17/bun-14s-rust-rewrite-cuts-script-startup-time-from-105ms-to-42ms-2je0"
  },
  "original_language": "en",
  "account": "Bun 1.4, released on August 20th, is the first stable release built on a new Rust-based core, replacing the previous Zig runtime layer. The release notes highlight faster startup times, less idle CPU usage, and lower memory consumption. This report compares Bun 1.3.14 and 1.4.2 in terms of startup time, idle memory usage, idle CPU, and throughput under load.\n\nStartup time:\nThe benchmark measured the time taken for the \"bun --version\" command. The difference in median startup time between the two versions was negligible, with 1.3.14 taking 10.54ms and 1.4.2 taking 4.22ms. When a script was run using \"bun run hello.js\", the median startup time dropped from 10.54ms to 4.22ms, a 60% improvement, surpassing the 50% faster claim by the release notes. The old binary also had a longer tail (up to 18ms) compared to the new one (staying within a 1.4ms band across all runs).\n\nIdle memory usage:\nThree warm-up runs and three idle runs were conducted for each version. The average idle memory consumption after 60 seconds dropped from 34.9MB (1.3.14) to 19.0MB (1.4.2), a 46% reduction. The release notes claim a reduction of up to 35%, which the report states was achieved in this workload. However, the report flags the claim of 5x less idle CPU as not backed by the measurements.\n\nIdle CPU:\nIdle CPU measurements were taken using utime + stime from /proc/pid/stat before and after a 60-second idle window, three times per version. The average CPU usage for 1.3.14 was 10.67% and 4.33% for 1.4.2, indicating a 2.5x improvement. The report notes that the CPU improvement may be due to a different idle workload rather than a bare Bun.serve with no traffic.\n\nThroughput under load:\nThe report measured the requests per second under load using autocannon with 50 concurrent connections for 8 seconds. Bun 1.3.14 produced an average of 29,456 requests per second, while Bun 1.4.2 generated 62,310 requests per second, a 2.15x improvement. Additionally, the p50 latency dropped from 1ms in 1.3.14 to sub-millisecond in 1.4.2.\n\nSymlink detection regression:\nWhen invoking Bun as 'node' using a symlink, the report discovered a regression in Bun 1.4.2. The .env file was not loaded correctly, causing the MY_SECRET environment variable to be undefined. In contrast, Bun 1.3.14 loaded the .env file correctly when invoked through a symlink named 'node'. The report suggests that developers using Bun as a drop-in replacement for Node, particularly in container images or CI pipelines, should be aware of this regression and use the --env-file flag if necessary.",
  "summary": "Bun 1.4 shipped on 20 August as the first stable release built on Bun's new Rust-based core, replacing the Zig runtime layer that shipped everything since 1.0. The release notes claim faster startup, less idle CPU, and lower memory. I installed the last pre-rewrite build and the new one side by side and measured all three, plus what happens when you point a node symlink at the new binary, which…",
  "key_points": [
    "Bun 1.4 rewritten in Rust, replacing previous Zig runtime",
    "Startup time improved 60%, from 10.54ms to 4.22ms",
    "Idle memory usage reduced 46%, from 34.9MB to 19.0MB"
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}