Maybe the same or similar technique could be use to make TypeScript apps faster, by compiling to Go.
For now, it is compiling "by Go"
10x faster.
A 10x Faster TypeScript - TypeScript (video)
by Anders Hejlsberg, TypeScript architect
"plug-and-play" replacement to original TypeScript compiler
he native implementation will drastically improve editor startup, reduce most build times by 10x, and substantially reduce memory usage
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 |
TypeScript Migrates to Go: What's Really Behind That 10x Performance Claim?
What's actually getting faster is the TypeScript compiler, not the TypeScript language itself or the JavaScript's runtime performance. Your TypeScript code will compile faster, but it won't suddenly execute 10x faster in the browser or Node.js.
No comments:
Post a Comment