typescript

TypeScript Now 10x Faster: Boost Your Development Speed

Microsoft has announced a major initiative to create a native port of TypeScript, moving from JavaScript to Go. This ambitious project aims to drastically improve performance for TypeScript developers, especially those working with large codebases who currently face long load and check times.

The native implementation promises to deliver substantial improvements across various metrics: drastically improved editor startup times, build times reduced by approximately 10x, and significantly lower memory usage. Microsoft has already demonstrated impressive benchmark results with the current implementation, which can successfully load many popular TypeScript projects.

TypeScript Performance benchmarks

Performance benchmarks show remarkable speed improvements across codebases of various sizes. For example, the Visual Studio Code codebase (1.5 million lines of code) saw compilation time reduced from 77.8 seconds to just 7.5 seconds—a 10.4x speedup. Similar improvements were seen across other projects, with speedups ranging from 9x to 13.5x. Editor performance sees similar gains, with project load times in VS Code reduced from 9.6 seconds to 1.2 seconds, an 8x improvement.

TypeScript Roadmap

The blog post outlines a clear roadmap for this transition. The team expects to preview a native implementation of the TypeScript compiler (tsc) capable of command-line typechecking by mid-2025, with a feature-complete solution including project builds and language service by the end of the year. The native version will eventually be released as TypeScript 7.0, while the JavaScript-based version will continue as TypeScript 6.x for backwards compatibility.

Key takeaways

  • Microsoft is porting TypeScript from JavaScript to Go to dramatically improve performance.
  • Build times are reduced by approximately 10x across various codebases, with specific projects seeing up to 13.5x improvement.
  • Editor startup times are 8x faster, with VS Code project load time dropping from 9.6 seconds to 1.2 seconds.
  • Memory usage is roughly halved compared to the current implementation.
  • The native TypeScript will be released as version 7.0, while the JavaScript version will continue as version 6.x.
  • Timeline targets mid-2025 for preview of command-line typechecking, with feature-complete implementation by end of 2025.
  • The Go code is already available under the same license as the existing TypeScript codebase.
  • The new implementation will support Language Server Protocol (LSP), better aligning with other languages.

Links

Announcement: A 10x Faster TypeScript

More Coding news.

Videos about TypesScript

Scroll to Top