News for hackers. Stuff that matters.
Re:ChowJS: An AOT JavaScript engine for game consoles by Leszek on Thursday September 16, 2021 @10:54AM (#28552599)
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.
Re:ChowJS: An AOT JavaScript engine for game consoles by Leszek on Thursday September 16, 2021 @10:59AM (#28552667)
Though, 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).