Wednesday, March 12, 2025

10x Faster TypeScript compiler, in GoLang!

 A 10x Faster TypeScript - TypeScript

...The native implementation will drastically improve editor startup, reduce most build times by 10x, and substantially reduce memory usage. By porting the current codebase, we expect to be able to preview a native implementation of tsc capable of command-line typechecking by mid-2025, with a feature-complete solution for project builds and a language service by the end of the year.

You can build and run the Go code from our new working repo, which is offered under the same license as the existing TypeScript codebase. Check the README for instructions on how to build and run tsc and the language server, and to see a summary of what’s implemented so far..."


Anders Hejlsberg, lead architect of TypeScript and Technical Fellow at Microsoft, introduces a new port of TypeScript that will deliver the next generation of high-performance developer tooling.


"...this wasn't a compiler redesign, and the TypeScript to Go move was far more automatable and more one-to-one in its mapping. Our existing codebase is all functions and data structures - no classes. Idiomatic Go looked just like our existing codebase so the port was greatly simplified."



by Maximilian Schwarzmüller





CodebaseSize (LOC)CurrentNativeSpeedup
VS Code1,505,00077.8s7.5s10.4x
Playwright356,00011.1s1.1s10.1x
TypeORM270,00017.5s1.3s13.5x
date-fns104,0006.5s0.7s9.5x
tRPC (server + client)18,0005.5s0.6s9.1x
rxjs (observable)2,1001.1s0.1s11.0x

No comments: