3 ms·
A JIT compiler can optimize based on the runtime behaviour of the code. For example, it can reduce the costs of runtime polymorphism by optimizing virtual metho
by brazzy 8y ago
A JIT compiler can optimize based on the runtime behaviour of the code. For example, it can reduce the costs of runtime polymorphism by optimizing virtual method calls as if they were statically bound, and then when a second implementation shows up, deoptimize the code to make it work correctly. Here's an in-dept article about that: https://shipilev.net/blog/2015/black-magic-method-dispatch/ https://shipilev.net/blog/2015/black-magic-method-dispatch/