Hacker News new | ask | show | jobs
by coldtea 1905 days ago
>AOT can't take into consideration runtime, which might result in less efficient code compilation vs JIT.

That has for decades been a "in the future we'll have flying-cars" style promise for 99% of workloads...

Sure, JIT can theoritically optimize based on runtime hints. But most of the time, for any practical use, it's slower than AOT.

1 comments

JITs have been extremely successful for dynamically typed languages, but that has always been a low hanging fruit for optimization.

Once you have a static type system, the JIT doesn't bring you much over ordinary AOT compilation, and no benefit over PGO...while losing out on global optimizations that aren't feasible in a JIT.