Sitemap

Member-only story

TypeScript 7.0 Is 10x Faster — Here’s What Changed

3 min read1 day ago

--

An overview of how the Go native compiler works and what to look out for when upgrading your React/Next.js/Full Stack JS project.

After staring at my terminal doing tsc for too long, Microsoft rewrote the compiler using Go. This improved the compile time of the VS Code codebase from 125.7 seconds to 10.6 seconds. This is not a small optimization, it’s a completely different tool! linuxiac

Press enter or click to view image in full size

What changed?

TypeScript 7.0 features the native compiler for the first stable release. This means that the compiler is ported from TypeScript to Go without any changes. Your types will be the same, but the compiler itself is brand new. infoq

Fast because:

  • Native compiler — No JS runtime to slow things down
  • Shared Memory Parallelism — Many parts of the build process can be parallelized such as parsing and type checking.
    linuxiac
  • Lower memory footprint — Microsoft also expect the compiler to have much lower memory usage. visualstudiomagazine

They report average speed increases of 8–12x. infoq

Why it matters

In a standard full-stack JavaScript project you may have: a Next.js front-end, a React.js component library, some Redux…

--

--

MERN Stack Developer | MongoDB • Express • React • Node.js | Writing about full-stack JavaScript, clean code & scalable app development.