Blog
About

Cloud & DevOpsTrend

TypeScript's Go port runs 10x faster; Cloudflare's Rust proxy uses under half the CPU

Five rewrites measured by the teams that did them: Cloudflare, Microsoft's TypeScript, Astral's uv and Ruff, Discord, and Firefox's Rust share from 2016 to October 2026.

Illustration: The TechBag Journal

Microsoft’s TypeScript compiler, ported to Go, built the VS Code codebase in 10.6 seconds in July; the old compiler took 125.7 seconds.1 Cloudflare’s request proxy, rebuilt in Rust, uses “less than half the CPU” of the one it replaced.5 Both numbers come from the teams that did the work, and those teams chose different languages for reasons they wrote down.

Software is being moved from one language to another, and in 2026 the moves reached tools developers run many times a day. Two languages carry most of it. Rust has no garbage collector (the automatic memory clean-up that can briefly pause a program) and checks memory use when the code is compiled. Go has a garbage collector. Both rule out the memory bugs that C and C++ allow. Our question is not which language is better, but what each rewrite measurably changed and why each team chose its language.

01The line: a quarter of Firefox's native code is now Rust

Firefox is the longest public record of a large codebase changing language piece by piece rather than in one rewrite. Rust was 8.7% of its Rust, C and C++ lines at the first release of 2018 and 19.0% by 2021, then flat for three years. Firefox 158, released on 7 October, carried 6.24 million lines of Rust: 26.1%.15

Rust grew from almost nothing to 26% of Firefox's native code in ten years, with a flat stretch in 2021–23

Rust lines as a share of Rust, C and C++ lines (headers included), first release of each year, 2016–2026, and Firefox 158

0255020162018202020222024Jan 2026Oct 2026Rust share 26.1

%

Table view
Rust share
20160
20170
20188.7
201913.4
202015.8
202119
202218.5
202318.4
202422.1
202522.6
Jan 202623.3
Oct 202626.1

Source: firefox-lang-stats, a community tracker (not Mozilla), counts at each release tag; TechBag computation · as of 7 October 2026 · Includes third-party Rust libraries shipped in the source tree

02What drives it: speed the teams measured, and reasons that disagree

TypeScript, to Go. Microsoft announced the port in March 2025 with a first benchmark: VS Code’s 1.5 million lines compiled in 7.5 seconds instead of 77.8.2 TypeScript 7.0 shipped on 8 July 2026 with “speedups between 8x and 12x on full builds” and lower memory use on all five codebases Microsoft published, by 6% to 26%.1 The 7.1 beta of 20 October ran a further 1.2x to 1.9x faster than 7.0 on Microsoft’s five test codebases, with 15.8% to 49.6% less memory.3

TypeScript 7, the Go port, ran full builds 7.7x to 11.9x faster than TypeScript 6

Full build time in seconds, TypeScript 6.0 vs 7.0 (default four checker threads), five open-source codebases, July 2026

  • TypeScript 6.0
  • TypeScript 7.0 (Go)
sentry15.7 s-89%vscode10.6 s-92%bluesky2.8 s-88%playwright1.47 s-89%tldraw1.46 s-87%
Table view
TypeScript 6.0TypeScript 7.0 (Go)Change
sentry14015.7-89%
vscode12610.6-92%
bluesky24.32.8-88%
playwright12.81.47-89%
tldraw11.21.46-87%

Source: Microsoft, Announcing TypeScript 7.0 · as of 8 July 2026 · Microsoft's benchmark on its own machine; build times on other projects will differ

Cloudflare’s proxy, to Rust. FL1, the software that handles every request, was NGINX (written in C) with LuaJIT. Its Rust replacement, FL2, responds 10 ms faster at the median, “a 25% performance boost” on third-party tests, and uses “less than half the CPU of FL1, and much less than half the memory”. Cloudflare gives the main reason as design, not language: “The biggest reason for this is simply that FL2 performs less work,” and FL1 spent time converting data between languages.5 On 18 September it reclaimed more than 100 TB of RAM in a service already written in Rust by changing an algorithm, and closed: “You might not be able to solve all your problems with Rust, but math is universal.”6

Python tools, to Rust. Astral’s Ruff lints the CPython codebase from scratch in 0.29 seconds; Flake8 takes 12.26 and Pylint more than 60, on the project’s own chart.11 Its installer, uv, was “8-10x faster than pip and pip-tools without caching, and 80-115x faster when running with a warm cache” at launch in February 2024,12 and installs one test project’s dependencies from a warm cache in 0.06 seconds against 4.63 for pip-sync.13 In March 2026 Astral agreed to join OpenAI’s Codex team and said it would keep its tools open source.14

Discord, from Go to Rust (2020). Its “Read States” service showed latency spikes “roughly every 2 minutes” on Go 1.9.2; in Rust, “Latency, CPU, and memory were all better.” The post gives its numbers only as charts.9

Each team’s stated reason for its language, in its own words:

  • Cloudflare, Rust (2025): “Built in Rust, it eliminates entire classes of bugs that plagued our Nginx/LuaJIT-based FL1, like memory safety issues and data races, while delivering C-level performance.”5
  • TypeScript team, Go (2025): “Idiomatic Go strongly resembles the existing coding patterns of the TypeScript codebase.” On garbage collection: “We don’t have any strong latency constraints that would suffer from GC pauses/slowdowns.” And: “many languages would be suitable in a ground-up rewrite situation.”4
  • Discord, Rust (2020): “the spikes were due to core Go features: its memory model and garbage collector (GC).” Also: “we don’t think you should rewrite everything in rust just because.”9
  • Astral, Rust (2022): “Python tooling could be rewritten in more performant languages.”10
  • Cloudflare, tsrs, Rust (20 October 2026): “it’s not just about speed”; “When you compile a Go program to Wasm, you have to compile Go’s garbage collector along with it.”7

03What it means for a buyer

Faster tools are the nearest gain, on your code. Every figure above is a benchmark on codebases and machines the team chose. uv’s benchmark page warns that results “may vary dramatically across different operating systems and filesystems”,13 and Cloudflare’s tsrs post notes that some published TypeScript-port claims used larger machines and non-default options.7 The useful number is your own build or test run, before and after.

Fewer memory bugs is a design claim; the teams name its limits. Cloudflare says Rust removes whole classes of bug, and in the same post: “It’s easy to write code in Rust, which causes memory corruption.”5 On 18 November 2025 a configuration file grew past a fixed limit; FL2’s Rust code “panicked” and customers on it got HTTP 5xx errors, while customers still on the old FL saw no errors and all their traffic was given a bot score of zero.8 Memory safety did not prevent that outage, and the older code returned wrong results rather than errors.

Migration has a cost the teams recorded. TypeScript 7.0 shipped without a stable programmatic API, so “Projects using Vue, MDX, Astro, Svelte, and others will need to continue using TypeScript 6.0 for now”;1 the 7.1 beta adds the API and a way for those tools to plug in.3 tsrs still prints some diagnostics in a different order from TypeScript.7

What to watch. Firefox 159, scheduled for 27 October, is the next point on the line.16 Microsoft expects the TypeScript 7.1 release candidate “in about a month” from the 20 October beta, with the final release “shortly thereafter”.3 Cloudflare has given no date for a stable tsrs.7 And Cloudflare said in September 2025 that it would turn FL1 off in early 2026;5 we found no post confirming it has.

Sources

  1. Microsoft, Announcing TypeScript 7.0 — 8 July 2026
  2. Anders Hejlsberg, Microsoft, A 10x Faster TypeScript — 11 March 2025
  3. Microsoft, Announcing TypeScript 7.1 Beta — 20 October 2026
  4. Ryan Cavanaugh, TypeScript team, Why Go? (typescript-go discussion 411) — 5 March 2025
  5. Cloudflare, Cloudflare just got faster and more secure, powered by Rust — 26 September 2025
  6. Cloudflare, Saving another 100TB of RAM with math (and Rust) — 18 September 2026
  7. Cloudflare, Introducing tsrs: a Port of TypeScript to Rust — 20 October 2026
  8. Cloudflare, Cloudflare outage on November 18, 2025 — 18 November 2025
  9. Jesse Howarth, Discord, Why Discord is switching from Go to Rust — 4 February 2020
  10. Charlie Marsh, Python tooling could be much, much faster — 30 August 2022
  11. Astral, Ruff README: linting the CPython codebase from scratch (benchmark chart) — README as of 22 October 2026
  12. Charlie Marsh, Astral, uv: Python packaging in Rust — 15 February 2024
  13. Astral, uv README and BENCHMARKS.md (warm-cache install of Trio's dependencies) — README as of 8 October 2026
  14. Charlie Marsh, Astral to join OpenAI — 19 March 2026
  15. firefox-lang-stats (community tracker), language line counts by Firefox release tag — Firefox 158 release, 7 October 2026
  16. Mozilla release calendar, Firefox 159 schedule (whattrainisitnow.com) — release scheduled 27 October 2026

Related on TechBag: the developer tools guide, the Cloudflare CDN & performance page and the Cloudflare developer platform page.

Disclosure. TechBag is a software reseller: it earns a margin when a reader buys through it, including from vendors named here. The analysis is TechBag’s own; no vendor paid for or saw this piece before publication. Facts are labelled reported, TechBag count or our view.