News for hackers. Stuff that matters.
Re:Nectar: A Native JavaScript Compiler Inspired by Crystal ... by mafribe on Friday December 30, 2016 @05:40PM (#13288114)
However, the JIT compilation process itself is expensive, as is the interpretation and tracing. Since JIT-optimisation happens at run-time, often sub-optimal but fast optimisations are chosen (e.g. linear scan register alloc instead of graph-colouring).

Indeed the performance benefits of JITing have been difficult to measure: https://arxiv.org/abs/1602.00602

Re:Nectar: A Native JavaScript Compiler Inspired by Crystal ... by MikeHolman on Saturday December 31, 2016 @12:46AM (#13289701)
Register allocation isn't super important in JS. Type inference is most important, and it is impossible to do that AOT for JS. With PGO I bet you could do decently for some specific scenarios, but you will necessarily fall off a cliff if execution deviates from your profile.