
In a remarkable announcement, Microsoft unveiled plans to enhance TypeScript’s performance with a transformative shift towards a native port of the TypeScript compiler, now being developed in the Go programming language. This ambitious project, codenamed Corsa, aims to address existing limitations encountered by developers when working with expansive codebases.
Feedback from the developer community highlighted significant challenges, such as prolonged editor startup times and incomplete source code displays. In response, Microsoft asserts that this new native implementation will markedly enhance editor startup performance, potentially reducing build times by as much as 10 times and minimizing memory consumption considerably.
Anticipated Performance Enhancements
Developers can look forward to a series of impressive performance improvements. The following table illustrates the expected enhancements for various codebases:
Codebase | Size (LOC) | Current | Native | 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 |
tRPC (server + client) | 18, 000 | 5.5s | 0.6s | 9.1x |
rxjs (observable) | 2, 100 | 1.1s | 0.1s | 11.0x |
Microsoft anticipates that developers will have the opportunity to preview this native port by mid-2025, with a command-line capable TypeScript compiler being among the first features available. A fully functional solution that includes project builds and integrated language services is expected to be ready by the end of that year.
Following the recent release of TypeScript 5.8, developers should also prepare for TypeScript 5.9, with substantial modifications expected in the upcoming TypeScript 6.0 to accommodate the new Go-based architecture. Notably, TypeScript 7.0 will introduce the native Go implementation later this year.
During the transition, the existing JavaScript-based TypeScript codebase will continue to evolve through the 6.x series until TypeScript 7+ achieves adequate stability and community adoption. This approach ensures that projects reliant on legacy APIs and configurations are supported during this significant transition.
Leave a Reply ▼