4 ms·
This is one of the cases where JIT compiling can shine. You can use a bazillion interfaces to decouple application code, and the JIT will optimize the calls aft
by samus 3y ago
This is one of the cases where JIT compiling can shine. You can use a bazillion interfaces to decouple application code, and the JIT will optimize the calls after it found out which implementation is used. This works as long as there is only one or two of them actually active at runtime.
- account42 3y agoYou don't need a JIT to do whole program optimization.
- samus 3y agoAOT whole program optimization has two limits: * It is possible with `dlopen()` to load code objects that violate the assumptions made during compilation. * The presence of runtime configuration mechanisms and application input can make it impossible to anticipate things like the choice of implementations of an interface. One can always strive to reduce such situations, but it might simply not be necessary if a JIT is present.