
Microsoft today surprised everyone by announcing a new change that will radically improve TypeScript performance. Microsoft is working on a native port of the TypeScript compiler and tools in the Go language. The native port project has been codenamed "Corsa."
As per developer feedback, Microsoft found that TypeScript has not been able to scale up to large codebases. Developers faced slow editor startup times, incomplete views of their source code, and more. Microsoft claims that this new native Go implementation will drastically improve editor startup, reduce build times by up to 10x, and also significantly reduce memory usage.
Developers can expect the following performance improvements:
Codebase |
Size (LOC) |
Current |
Native |
Speedup |
1,505,000 |
77.8s |
7.5s |
10.4x |
|
356,000 |
11.1s |
1.1s |
10.1x |
|
270,000 |
17.5s |
1.3s |
13.5x |
|
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 expects that this native porting will be previewed with a tsc capable of command-line type checking by mid-2025. A feature-complete solution for project builds and a language service will be released by the end of the year. Interested developers can now build and run the Go code from Microsoft’s new working repository.
Microsoft recently released TypeScript 5.8, and TypeScript 5.9 is coming soon. Developers can expect TypeScript 6.0 to have some deprecations and breaking changes to support the upcoming Go-based version. Later this year, Microsoft will be releasing this new native Go implementation as TypeScript 7.0.
The current JS-based TypeScript codebase will continue development into the 6.x series until TypeScript 7+ reaches sufficient maturity and adoption, since some projects may depend on certain API features, legacy configurations, or other things that are not supported by TypeScript 7+.
4 Comments - Add comment