3 ms·
> A JIT compiler is not competitive in performance with an AOT compiler if both are using the same code generation implementation. If a JIT uses the same code
by pron 11y ago
> A JIT compiler is not competitive in performance with an AOT compiler if both are using the same code generation implementation.
If a JIT uses the same code generation as an AOT, it will work as an AOT, namely, only when the application starts, without additional burden during its runtime. Most good JITs use profiling information, which is collected at runtime -- this has some memory overhead, but results in better code.
> And profiling is limited in what it can do, especially when AOT compilation with PGO as used by projects like Firefox is considered.
Modern JITs are like _very_ sophisticated PGO AOTs, but they have true profiles exposed to them. Besides, the overhead for even a good JIT is not that large, it's just that on mobile devices even a bit more RAM is more than you're willing to afford.