Microsoft is making TypeScript 10x faster with native implementation in Go

Microsoft boosts TypeScript speed by 10x using a new Go-based compiler.

: Microsoft enhances TypeScript with Go language, improving speed by tenfold. Anders Hejlsberg leads the performance boost effort by porting TypeScript's compiler to Go, aiding all major editors with better handling of large projects. Performance gains range from 9.1x to 13.5x, showcasing significant enhancements. TypeScript 7.0 will run parallel to existing versions, ensuring developer needs are met smoothly.

Microsoft has announced a significant improvement to TypeScript, a highly popular open-source programming language designed for large-scale applications. According to Anders Hejlsberg, the lead architect, TypeScript will become ten times faster due to the new implementation in the Go programming language. Go is a high-level language known for its compiled nature, which enhances performance for large codebases by reducing editor startup and compilation times. The change aims to improve the experience for developers managing extensive projects, as the existing TypeScript's JavaScript-based system sometimes struggles with large datasets and lengthy load times.

Hejlsberg emphasized that this performance shift would be particularly impactful in code editors, where most development tasks occur. For instance, using the Visual Studio Code as a benchmark, the new implementation decreases load times from 9.6 seconds to just 1.2 seconds on a fast computer. The Go-based update also optimizes memory usage, potentially halving current requirements, thus streamlining project management for developers working with monumental codebases.

The development team has already observed impressive performance enhancements across several renowned projects on GitHub. For example, tRPC saw improvements of 9.1x, while TypeORM realized a remarkable 13.5x increase. These advancements are still in a developing phase, meaning further potential exists once the Go version of TypeScript becomes feature-complete.

This Go-based TypeScript version is expected to be labeled as TypeScript 7.0. Meanwhile, previous implementations, including the upcoming TypeScript 5.9 and the 6.x series, will continue to receive support. This strategy allows for a transitional period in which users can adapt to the enhancements while ensuring compatibility with existing projects. Microsoft underscores the importance of maintaining continuity for developers still reliant on older versions.

The wider impact of this initiative is poised to revolutionize how TypeScript is used across the software development industry. With TypeScript currently ranked as the 37th most popular programming language, and Go as the 7th according to the TIOBE Index, this integration may accelerate TypeScript's ascension in popularity and utility. As more features and optimizations come to light, developers can expect even greater enhancements in both functionality and performance.

Sources: TechSpot, TIOBE Index