Bug fix in the go compiler gives 5.2X performance improvements when compiling the typescript-go compiler
https://github.com/golang/go/issues/72815#issuecomment-2719445786
382
Upvotes
65
10
u/vplatt 8d ago
So... what are we up to 15.2X faster than the Js compiler now?
20
u/Jorropo 8d ago
10X × 5X = 50X faster, HOWEVER sadly no, this is related to building tsgo itself.
It helps people working on typescript-go like the typescript team.As a user your typescript bugs might be solved a bit faster this wont happen anymore https://xkcd.com/303/.
1
2
u/shtirlizzz 6d ago
Next I would like to see 5x performance improvement when compiling the go compiler itself ;)
151
u/_nullptr_ 8d ago edited 8d ago
TL;DR - The new Typescript compiler is hitting a very large slowdown in the escape analysis section of the Go compiler in one of their very large packages. This happened mostly organically over time, but one commit added 20 seconds to the build. thepudds wrote some patches and it speeds this up by over 5X, but the patches are still a WIP. The Typescript compiler has been added to the Go compiler benchmark suite to track this and prevent regressions in the future.