4 ms·
Why would you assume Typescript solves any speed issues? Typescript's type checking adds overhead just the same. So it's also a good idea to disable checks dur
by EvanPlaice 11y ago
Why would you assume Typescript solves any speed issues?
Typescript's type checking adds overhead just the same. So it's also a good idea to disable checks during runtime.
- tlrobinson 11y agoTypeScript doesn't do any runtime checks, AFAIK. In fact, that's one of their stated goals: "Impose no runtime overhead on emitted programs." https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals https://github.com/Microsoft/TypeScript/wiki/TypeScript-Desi...
- EvanPlaice 11y agoTo-may-to, to-mah-to. That doesn't answer what I was asking. Fact: type checking is disabled during runtime. Why would one assume that Typescript somehow solves speed issues? It has no measurable impact on runtime performance.
- tlrobinson 11y agoI was addressing the second part of your comment. TypeScript is a static type checker. It operates at compile time. There is nothing to "disable" at runtime. But yes, regarding your original question, you are correct, aggressive optimization is a non-goal of TypeScript. It won't improve performance.