4 ms·
> - At least 20% performance improvement over plain JavaScript. How would that work? TS is not an optimizing compiler, it's only a type checker.
by wereHamster 6y ago
> - At least 20% performance improvement over plain JavaScript.
How would that work? TS is not an optimizing compiler, it's only a type checker.
- cryptica 6y agoWell ActionScript 3 got it to 40% thanks to static type performance optimizations. They did rewrite the engine. That's what it takes unfortunately. The fact that Microsoft does not want to hire serious compiler engineers and prefers to spend all the money on marketing is not my fault.
- benschulz 6y agoYou do realize that Anders Hejlsberg is on the TypeScript team? I don't want to imply that he's superhuman or anything, but.. just what is your idea of "serious compiler engineers"?
- Jasper_ 6y agoActionScript 3 got a huge improvement because they added a JIT. AVM1 was an interpreter, and a very infamously bad one at that.
- dwaite 6y agoIt is hopefully apparent that the 40% increase (whether it was meant to indicate over leading Javascript engines at the time or over the ActionScript 2 engine) does not in any way indicate there is headroom for a 40% performance increase if static type performance optimizations were applied to a modern Javascript engine. Many performance improvements come from being able to do code analysis during generation, which is already a trade-off for environments doing in-time interpretation, code generation and optimization. Large performance increases would most come from removing dynamic language complexity, such as having use of the 'class' feature added in ECMAScript create non-mutable properties by default for function declarations.