Microsoft promises a 10x TypeScript speed increase for faster coding
TypeScript significantly reduces most build times
2 min. read
Published on
Read our disclosure page to find out how can you help Windows Report sustain the editorial team. Read more
Microsoft has announced a significant leap forward for TypeScript with the development of a native port of its compiler and tools. This initiative, led by Anders Hejlsberg, aims to address performance challenges in large codebases by transitioning from TypeScript/JavaScript to a native implementation in Go.
The native implementation will drastically improve editor startup, reduce most build times by 10x, and substantially reduce memory usage, said Hejlsberg, the lead architect of TypeScript and Technical Fellow at Microsoft.
The project, dubbed Project Corsa, is expected to deliver a preview of the native TypeScript compiler by mid-2025, with a feature-complete version ready by the end of the year.
The native port promises transformative performance improvements. For instance, the time to run the TypeScript compiler on the Visual Studio Code codebase, which has over 1.5 million lines of code, is projected to drop from 77.8 seconds to just 7.5 seconds, a 10.4x speedup. Similar gains are expected across other popular codebases.
Here is the complete speed increase, provided by Microsoft for several 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’s decision to use Go for this port was influenced by its balance of low-level control, optimized native code support, and concurrency features. The company plans to maintain both the current JavaScript-based and the new native codebases for the foreseeable future, ensuring a smooth transition for developers.
This development marks a pivotal moment for TypeScript, enhancing its scalability and efficiency while opening doors to new possibilities in AI-powered features and large-scale application development. But these are just words. If you’re a developer, you will definitely test the new features and see if they bring that extra kick you were looking for.
User forum
0 messages