---
title: "TypeScript's Go port runs 10x faster; Cloudflare's Rust proxy uses under half the CPU"
summary: "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."
url: https://www.thetechbag.com/blog/rewrites-rust-go-measured-results
format: Trend
desk: "Cloud & DevOps"
published: 2026-10-25
facts_checked: 2026-10-25
author: TechBag (The TechBag Journal)
tags: ["Rust","Go","TypeScript 7","tsrs","Cloudflare","FL2","Discord","uv","Ruff","Astral","Firefox","memory safety","rewrites"]
cover: https://www.thetechbag.com/blog/covers/rewrites-rust-go-measured-results.png
---

# 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.*

Trend · Cloud & DevOps · By TechBag · Published 2026-10-25 · Facts checked 2026-10-25 · Canonical: https://www.thetechbag.com/blog/rewrites-rust-go-measured-results

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.

The short version

- The measured gains are large and come from the builders themselves: TypeScript 7 (Go) runs full builds 7.7x to 11.9x faster than TypeScript 6 on five codebases; Cloudflare’s Rust proxy answers 10 ms faster at the median; Ruff and uv (Rust) beat Flake8 and pip-sync by 40x and more on their own benchmarks.
- The stated reasons differ, and sometimes point opposite ways. Discord left Go in 2020 over garbage-collection pauses; the TypeScript team chose Go and says such pauses do not matter for a compiler; Cloudflare ported TypeScript again, to Rust, on 20 October, citing WebAssembly.
- For a buyer, faster developer tools are the nearest gain. Fewer memory bugs is a design claim to ask a vendor to show. The teams also recorded the costs: TypeScript 7 left Vue and Svelte projects on version 6, and Cloudflare’s Rust proxy returned errors in its November 2025 outage.

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.

## The 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]

**Figure: 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*

|  | Rust share |
| --- | --- |
| 2016 | 0 |
| 2017 | 0 |
| 2018 | 8.7 |
| 2019 | 13.4 |
| 2020 | 15.8 |
| 2021 | 19 |
| 2022 | 18.5 |
| 2023 | 18.4 |
| 2024 | 22.1 |
| 2025 | 22.6 |
| Jan 2026 | 23.3 |
| Oct 2026 | 26.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

TechBag countHow we computed the line

For the first release tag of each year, and for Firefox 158, we divided the tracker’s Rust line count by its Rust, C, C++ and header counts combined. The tracker is maintained outside Mozilla.

## What 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]

**Figure: 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) | Change |
| --- | --- | --- | --- |
| sentry | 140 | 15.7 | -89% |
| vscode | 126 | 10.6 | -92% |
| bluesky | 24.3 | 2.8 | -88% |
| playwright | 12.8 | 1.47 | -89% |
| tldraw | 11.2 | 1.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]

ReportedOne feature, three readings

The garbage collector was Discord’s reason to leave Go, a cost the TypeScript team judged negligible for a compiler, and Cloudflare’s reason to port that compiler to Rust for WebAssembly. Each judged its own workload. Cloudflare reports tsrs, an experimental release, as “up to 8x faster” than TypeScript 7.0 with “~70% less memory” at the same number of checker workers, and puts the 7.1 beta at “up to 2.5x faster” than 7.0;[7] Microsoft’s own 7.1 table shows 1.2x to 1.9x on its five codebases.[3]

## What 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]

Our viewThree questions for a vendor that says it rewrote

- What did you measure before and after, on which workload, and is the method published?
- Which integrations, plugins or APIs change, and how long is the old version supported?
- How does the new code fail on input it does not expect: an error, a stop, or a wrong answer?

**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.

How we did this

Figures as of 25 October 2026

Every result is the number the team that did the work published, with its method: Microsoft’s TypeScript posts, the Cloudflare and Discord engineering blogs, and Astral’s posts, README charts and benchmark page. We re-ran no benchmark. The results are not comparable across companies: each measures a different thing on its own machines. Multiples are the team’s, or a division of two times it published. The Firefox line is our computation from a community tracker, not Mozilla. Quotations are verbatim. Left out: Discord’s latency figures (charts only) and package download counts.

Spotted an error? Write to us; corrections are published at the foot of the piece.

Sources

1. [Microsoft, Announcing TypeScript 7.0](https://devblogs.microsoft.com/typescript/announcing-typescript-7-0/) — 8 July 2026
2. [Anders Hejlsberg, Microsoft, A 10x Faster TypeScript](https://devblogs.microsoft.com/typescript/typescript-native-port/) — 11 March 2025
3. [Microsoft, Announcing TypeScript 7.1 Beta](https://devblogs.microsoft.com/typescript/announcing-typescript-7-1-beta/) — 20 October 2026
4. [Ryan Cavanaugh, TypeScript team, Why Go? (typescript-go discussion 411)](https://github.com/microsoft/typescript-go/discussions/411) — 5 March 2025
5. [Cloudflare, Cloudflare just got faster and more secure, powered by Rust](https://blog.cloudflare.com/20-percent-internet-upgrade/) — 26 September 2025
6. [Cloudflare, Saving another 100TB of RAM with math (and Rust)](https://blog.cloudflare.com/saving-100-tb-of-ram-with-math/) — 18 September 2026
7. [Cloudflare, Introducing tsrs: a Port of TypeScript to Rust](https://blog.cloudflare.com/typescript-rust-port/) — 20 October 2026
8. [Cloudflare, Cloudflare outage on November 18, 2025](https://blog.cloudflare.com/18-november-2025-outage/) — 18 November 2025
9. [Jesse Howarth, Discord, Why Discord is switching from Go to Rust](https://discord.com/blog/why-discord-is-switching-from-go-to-rust) — 4 February 2020
10. [Charlie Marsh, Python tooling could be much, much faster](https://notes.crmarsh.com/python-tooling-could-be-much-much-faster) — 30 August 2022
11. [Astral, Ruff README: linting the CPython codebase from scratch (benchmark chart)](https://github.com/astral-sh/ruff) — README as of 22 October 2026
12. [Charlie Marsh, Astral, uv: Python packaging in Rust](https://astral.sh/blog/uv) — 15 February 2024
13. [Astral, uv README and BENCHMARKS.md (warm-cache install of Trio's dependencies)](https://github.com/astral-sh/uv/blob/main/BENCHMARKS.md) — README as of 8 October 2026
14. [Charlie Marsh, Astral to join OpenAI](https://astral.sh/blog/openai) — 19 March 2026
15. [firefox-lang-stats (community tracker), language line counts by Firefox release tag](https://4e6.github.io/firefox-lang-stats/) — Firefox 158 release, 7 October 2026
16. [Mozilla release calendar, Firefox 159 schedule (whattrainisitnow.com)](https://whattrainisitnow.com/release/?version=159) — release scheduled 27 October 2026

Related on TechBag: the [developer tools guide](https://www.thetechbag.com/browse/devops/developer-tools), the [Cloudflare CDN & performance page](https://www.thetechbag.com/cloudflare/cloudflare-cdn-performance) and the [Cloudflare developer platform page](https://www.thetechbag.com/cloudflare/cloudflare-developer-platform).

**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.

Go deeper on TechBag

- [Developer tools guide](https://www.thetechbag.com/browse/devops/developer-tools) — where faster compilers, linters and package managers land in a buyer's toolchain
- [Cloudflare CDN & performance](https://www.thetechbag.com/cloudflare/cloudflare-cdn-performance) — the service that runs on the FL2 Rust proxy
- [Cloudflare developer platform](https://www.thetechbag.com/cloudflare/cloudflare-developer-platform) — Workers and WebAssembly, the reason Cloudflare gives for tsrs in Rust
