TypeScript is a superstar in the coding world, loved by developers for adding safety and smarts to JavaScript. But as projects get bigger, it’s been showing its age—slow builds, laggy editors, and heavy memory use have frustrated users. Enter Microsoft’s bold move: rewriting the TypeScript compiler in Go, a fast, native programming language. Announced on March 11, 2025, this overhaul—dubbed Project Corsa—promises to make TypeScript 10 times faster.
So, why did Microsoft pick Go for this job? And what goodies does it bring to developers like you? In this blog, we’ll unpack the reasons behind the switch and explore the jaw-dropping benefits in plain English. Whether you’re a TypeScript newbie or a pro, you’ll see why this change is a big deal in 2025. Let’s dive in!
Table of Contents
Why Rewrite TypeScript? The Problem with JavaScript
Before we get to Go, let’s talk about why TypeScript needed a makeover. Originally, TypeScript was written in JavaScript and ran on Node.js. That made sense back in 2012—it’s a JavaScript tool, after all! But as codebases grew to millions of lines (think VS Code or Playwright), cracks started showing:
- Slow Builds: Compiling big projects with
tsc
could take minutes, not seconds. - Editor Lag: Opening a project or finding references felt like waiting for paint to dry.
- Memory Hog: The JavaScript runtime ate up RAM, slowing everything down.
Why? JavaScript’s runtime (Node.js) is built for browser tasks like rendering web pages, not the heavy lifting of a compiler. Compilers crunch tons of code fast, and Node.js just wasn’t cutting it. Microsoft saw the pain—developers deserve better—so they decided to port TypeScript to native code. But why Go? Let’s find out.
Why Go? Microsoft’s Smart Choice
Microsoft could’ve picked Rust, C#, or another language, but they chose Go (aka Golang) for Project Corsa. Here’s why, straight from the team (and a nod to Anders Hejlsberg’s video explanation at 2:30):
1. Native Speed Made Simple
Go compiles to native code—super-fast machine instructions your computer loves. Unlike JavaScript, which needs a runtime to translate it, Go skips the middleman. Plus, it’s low-level enough to control how data moves but high-level enough to avoid Rust’s tricky memory management.
2. Concurrency Built-In
Compilers juggle lots of tasks—parsing files, checking types, spitting out code. Go’s concurrency (handling multiple jobs at once) is a breeze with its “goroutines.” Microsoft used this to turbocharge Corsa, splitting work across your computer’s cores.
3. Matches TypeScript’s Style
Go’s structural typing (how objects are shaped) mirrors TypeScript’s, making the port smoother. It’s like moving furniture to a house with the same layout—less hassle than a total redesign.
4. Single-File Output
Go builds one tidy executable file. No messy dependencies or setup—just grab tsc
and go. Compare that to Node.js, where you need a whole runtime installed.
5. Garbage Collection
Unlike Rust, Go has automatic memory management (garbage collection). That means Microsoft could focus on speed, not wrestling with memory leaks. It’s a productivity win for a big project like this.
6. Cross-Platform Power
Go works flawlessly on Windows, macOS, and Linux, with no tweaks needed. Since TypeScript devs use all kinds of machines, Go’s a perfect fit.
In short, Go gives Microsoft speed, simplicity, and flexibility—without reinventing the wheel. As Hejlsberg said, “It’s a line-by-line port, not a rewrite,” keeping the soul of TypeScript intact.
The Benefits of TypeScript in Go
So, what’s in it for you? Rewriting TypeScript in Go (aka TypeScript 7.0) brings a treasure chest of perks. Let’s break them down with examples and numbers from Microsoft’s tests.
1. Blazing-Fast Performance
The native Go version slashes build times by 10x or more. Here’s proof from real projects:
Codebase | Size (Lines) | Old Time (JS) | New Time (Go) | Speedup |
---|---|---|---|---|
VS Code | 1,505,000 | 77.8s | 7.5s | 10.4x |
Playwright | 356,000 | 11.1s | 1.1s | 10.1x |
TypeORM | 270,000 | 17.5s | 1.3s | 13.5x |
date-fns | 104,000 | 6.5s | 0.7s | 9.5x |
- What It Means: A 77-second VS Code build now takes 7 seconds. That’s less time waiting, more time coding!
- How They Did It: Half the gain is from native code’s raw speed; the other half is concurrency—parsing and emitting files in parallel. Type checking splits files across multiple checkers, too.
2. Turbocharged Editors
Your editor (like VS Code) is where you live as a developer. Corsa makes it snappy:
- Startup Speed: Loading VS Code’s project drops from 9.6 seconds to 1.2 seconds—an 8x boost.
- Quick Features: Finding references or renaming variables? Instant, not sluggish.
Why? Native code skips JavaScript’s overhead, and Go’s efficiency keeps things smooth.
3. Lighter on Memory
The Go version uses half the memory of the old JavaScript one. For example:
- Old TypeScript might gobble up 1GB of RAM on a big project.
- Corsa cuts that to ~500MB—and Microsoft says more savings are coming.
Less memory means your computer stays happy, even with giant codebases.
4. Better Developer Experience
Speed isn’t just about numbers—it’s about feeling good while coding:
- Rename with Confidence: Change a variable name across a million lines, no sweat.
- Find Everything: See all uses of a function instantly.
- Navigate Fast: Jump around your code without delays.
Corsa’s speed makes these everyday tasks a joy, not a chore.
5. Powering AI Tools
AI coding assistants (like GitHub Copilot) thrive on fast, full-project analysis. Corsa’s low latency unlocks:
- Instant error spotting across your codebase.
- Smarter code suggestions based on everything, not just a snippet.
- New tools that “learn” your style—think next-level pair programming.
In 2025, this could redefine how we code with AI.
6. Language Server Protocol (LSP)
Corsa adopts LSP, a standard that connects editors to language tools. Benefits:
- Works with more editors (not just VS Code).
- Easier for other languages to plug in.
- Future-proofs TypeScript for years to come.
How Go Makes It Happen
Let’s peek under the hood at how Go delivers these wins:
- Concurrency Magic: Go’s goroutines let Corsa parse files, bind symbols, and emit code all at once. Type checking splits work across “checkers” for extra speed.
- Native Power: No JavaScript runtime means no delays—just raw, machine-level performance.
- Optimized Design: Go’s control over data layout cuts waste, boosting speed and memory use.
It’s like upgrading from a single-lane road to a multi-lane highway—everything flows faster.
Why Not Rust or C#?
You might wonder: why not Rust (super fast) or C# (Microsoft’s own)? Here’s the scoop:
- Rust: Crazy fast, but its manual memory management slows development. Go’s garbage collector sped up the port.
- C#: Great for Windows, less universal than Go. Plus, Go’s simplicity won out.
On X, devs debate this—“Rust would’ve been epic!”—but Microsoft’s choice prioritizes practicality. Go’s balance of speed and ease sealed the deal.
What’s Next for Corsa in 2025
This isn’t a “done” project—it’s rolling out:
- Mid-2025: Preview
tsc
for type-checking. - End of 2025: Full TypeScript 7.0 with editor support.
- Ongoing: TypeScript 6 (JS) sticks around for legacy needs, aligning with 7 over time.
Try it now on GitHub (microsoft/typescript-go
)—it’s a work in progress, but the speed’s already real.
Final Thoughts
Microsoft rewrote TypeScript in Go to fix its biggest pain: performance. By ditching JavaScript’s runtime for Go’s native power, they’ve slashed build times by 10x, halved memory use, and supercharged your editor—all while setting the stage for AI-driven coding. It’s a win for developers in 2025, whether you’re on a tiny app or a massive codebase.
Lets Do the Discussion on Reddit : https://www.reddit.com/user/ni18_in/comments/1j8yull/typescript_project_corsa_10x_faster_builds_are/?utm_source=share&utm_medium=web3x&utm_name=web3xcss&utm_term=1&utm_content=share_button