3 ms·
This is very cool. The splitting of logic between startup/warmup and execution is crucial here, to be able to get all that type inference and those speculative
by Leszek 5y ago
This is very cool. The splitting of logic between startup/warmup and execution is crucial here, to be able to get all that type inference and those speculative optimisations without hitting the limits of static analysis of the JS code. I wonder if the speculative optimisations could be further strengthened by taking advantage of e.g. Typescript type annotations.
- Leszek 5y agoThough, I don't see any discussion here on failed speculation / deoptimisation, and I do see discussion of disabling individual optimisation passes. I guess the generated optimized code assumes that all the speculative types collected during startup stay stable? This makes sense in a highly controlled environment like a game engine, though it makes the project less amenable for general purpose use (which is fine).