Also tsc is slow, sure, but only for the first run. Enabling `incremental` flag or using watch mode with `--transpile-only` usually brings compile time under 100ms, Making it practically indistinguishable from SWC or ESBuild.
Basically,
> Let's say TypeScript takes over 20 seconds to type-check a medium-sized program. That's not usually because it's JS, it's often because of types that cause a combinatorial explosion.
Also
> A different runtime can afford a lot (it sounds like parallelism and start-up time in this case) but I haven't seen a CPU-bound benchmark that supports the idea of a 20x all-up speed-up.
That's not to say they're useless though, they're good for fast hot-reload as you can have type-checking running in parallel.
<<<<<<<<T>>>>>>>>
Is basically a guaranteed headache
Written in Rust by the (lead?) dev of SWC
---
SWC (speedy web compiler) compiles TS to JS
STC (speedy type checker) checks TS types
[0] https://github.com/microsoft/TypeScript/pull/53463#issuecomm...
And TypeScript is always slow, not only when you do abuse its type system and require it to do complex inference - I mostly use it for "this is a number" and "this is a object with the following 4 fields" and it's still by far the slowest component in my builds usually
We had a very large Angular 10 project that we replaced with an NX Angular project late last year. We went from ~6 minute prod compile to around 20 seconds, recompile is lightning fast because it only builds your affected library. That is all without using the remote library cache feature where you can save compiled libraries to the cloud such that a user only builds the libraries they are changing ever.
TypeScript's compiler _is_ written in a compiled language.
(I think you are using "compiled" here as a euphemism—one that doesn't help anyone.)