---
title: "Bun v1.0.20"
description: "Bun v1.0.20 cuts memory usage in node:fs async operations by avoiding redundant cross-thread string clones."
url: "https://swe.quest/articles/bun-v1-0-20-4c5d451d499e769b"
canonical: "https://bun.com/blog/bun-v1.0.20"
source: "Bun"
published: "2023-12-24"
difficulty: "medium"
kind: "Release"
reading_minutes: 6
tags: ["javascript","runtimes","memory-management","performance"]
---

# Bun v1.0.20

A post on [Bun](https://swe.quest/sources/bun.md), published 2023-12-24, 6 min read, Release. Original: [https://bun.com/blog/bun-v1.0.20](https://bun.com/blog/bun-v1.0.20)

## Summary

Bun v1.0.20 cuts memory usage in node:fs async operations by avoiding redundant cross-thread string clones. Benchmarks show fs.readlink and fs.stat dropping from 107 MB to about 45–71 MB RSS, and a fs.writeFile leak with large non-ASCII strings falling from 1,696 MB to 91 MB. HTMLRewriter.transform now accepts strings and ArrayBuffers and has a destructor-timing leak fixed, and fs.readFile/writeFile gain hex and base64 encodings. A Linux setTimeout high-CPU regression is fixed, Bun.spawn gains a resourceUsage report, and debug builds use macOS malloc zones to track native allocations.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [JavaScript](https://swe.quest/tags/javascript.md) (Languages)
- [Runtimes & VMs](https://swe.quest/tags/runtimes.md) (Compilers & runtimes)
- [Memory management](https://swe.quest/tags/memory-management.md) (Compilers & runtimes)
- [Performance engineering](https://swe.quest/tags/performance.md) (Reliability & operations)

## Prerequisites

- Node.js fs API ([easy posts on JavaScript](https://swe.quest/tags/javascript.md?difficulty=easy))
- JavaScript promises ([easy posts on JavaScript](https://swe.quest/tags/javascript.md?difficulty=easy))

## Keywords

Bun, HTMLRewriter, Bun.spawn, node:fs, malloc zones, Node.js

## Related posts

- [Bun v0.6.9](https://swe.quest/articles/bun-v0-6-9-0635261452349fca.md): Bun · 2023-06-13 · Medium · 3 min read · JavaScript, Runtimes & VMs, Memory management
  Bun v0.6.9 focuses on memory reductions: zero-copy string Response bodies in Bun.serve() and Response (60 MB vs Deno's 425 MB and Node's 1414 MB after 1000 responses of a 12 MB string), 50% less memory for cold bun install, and fixed leaks when importing modules.
- [Bun v0.3.0](https://swe.quest/articles/bun-v0-3-0-ce34b4df06ef614a.md): Bun · 2022-12-07 · Medium · 8 min read · JavaScript, Runtimes & VMs, Performance engineering
  Bun v0.3.0 focuses on stability and Node.js/Web API compatibility, cutting memory use 3-5x under load by scheduling garbage collection in coordination with the event loop and speeding up TextEncoder.encodeInto() 3x via simdutf.
- [Bun 1.4](https://swe.quest/articles/bun-1-4-fea28913dacb5d89.md): Bun · 2026-08-20 · Medium · 217 min read · Runtimes & VMs, JavaScript, Performance engineering, Memory management, Rust
  Bun 1.4 adds 1,517 newly passing Node.js test-suite tests, fixes over 2,900 issues, and rewrites Bun from Zig to Rust.
- [Bun v1.1.17](https://swe.quest/articles/bun-v1-1-17-36691cca78554f0f.md): Bun · 2024-06-25 · Medium · 3 min read · JavaScript, Runtimes & VMs, Performance engineering, Zig
  Bun v1.1.17 fixes four bugs and makes two small macOS performance improvements.
- [Bun v1.2.2](https://swe.quest/articles/bun-v1-2-2-430cc9d4f8048e2e.md): Bun · 2025-02-01 · Medium · 8 min read · JavaScript, Runtimes & VMs, Memory management
  Bun v1.2.2 fixes 38 bugs and cuts idle JavaScript memory usage by 10–30% (28% for Next.js, 11% for Elysia).

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
