The Microsoft-led TypeScript 7.0 features an order-of-magnitude speed boost, a victory not only for TypeScript itself but also for Go, the programming language used to completely rewrite the web staple's compiler. Following a major rewrite effort that began with an experimental native Go implementation, this is the first stable release of the language to include its long-in-development Go-based compiler rewrite.
“TypeScript 7 brings native code speed, shared memory multithreading, and a number of new optimizations that typically yield speedups between 8x and 12x on full builds,” wrote Microsoft Principal Product Manager Daniel Rosenwasser.
For the user's code editor, the rewrite shortens the time it takes files to open, to search through the code, for auto-completion to awaken and do its job. You thought that the text editor was slowing you down, but in many cases, the imported TypeScript Language Server was the culprit. The speedup happens in development time, not in the deployment. Too Big for JavaScriptLast year, the TypeScript team deliberately set out to give TypeScript a much-needed bump in speed. Everything on the TypeScript language server would have to be rewritten from scratch, proclaimed Anders Hejlsberg, who, along with Steve Lucco, initially built TypeScript to bring static typing, and hence programming rigor, to JavaScript. The port to native code from the original compiler, written in TypeScript and executed by the V8 JavaScript engine, was necessary for performance reasons, Hejlsberg said earlier this year. “We quickly realized we could get 10x, half of it from being native code, and the other half from being able to take advantage of shared memory concurrency.”In the best spirit of bootstrapping, the previous version of TypeScript language server was rendered in JavaScript. But large-scale users were growing more frustrated. For instance, developers at Slack couldn’t even do a full type-check of their own code, so sluggish was their language server. Instead, the task was left for the continuous integration server.With TypeScript 7, full type checks can be done by the developer again at Slack. In Microsoft benchmarks, compiling VScode, with its 2.3 million lines of code, took TypeScript 6 125 seconds. TypeScript 7 did the job in only 10.6 seconds – an 11.9x increase. TypeScript 7 (we're told) also made short work of other source code behemoths, including Sentry (1.9 million lines of code in 15.7 seconds), Bluesky (628,000 lines in 2.8 seconds), and Playwright (528,000 lines of code in 1.47 seconds).












