Re:Java is very fast, if you don’t create many objects
by kaba0 on Monday September 12, 2022 @11:21AM
(#32811713)
A JIT compiler can elide a virtual method to a simple static call based on how many implementing classes are loaded at runtime, or can remove conditional branches from code (e.g. think of a setting whose boolean value is checked in a hot loop (for example something graphics related) - a JIT compiler will remove the conditional based on the setting used).
Fun fact, the linux kernel actually has something similar with self-modifying code, that will remove a conditional at runtime.
Fun fact, the linux kernel actually has something similar with self-modifying code, that will remove a conditional at runtime.