4 ms·
The tradeoffs are more subtle. A JIT compiler has more timing constraint, but more information about the runtime behavior of code. As a counter-point to your a
by apignotti 3y ago
The tradeoffs are more subtle. A JIT compiler has more timing constraint, but more information about the runtime behavior of code.
As a counter-point to your argument, consider a highly dynamic language such as JavaScript, in particular the '+' operator. An AOT compiler would have no choice but dispatch to a generic heavy implementation that could handle any possible combination of inputs. On the other hand a JIT compiler can observe the runtime values used and specialize using Inline Caches, potentially down to just a few instructions.