3 ms·
Except that, as evidenced by this case, the JVM isn't doing the optimization either! (Also: it's not a stupid approach. Due to the way the JVM loads things, mo
by TheLoneWolfling 12y ago
Except that, as evidenced by this case, the JVM isn't doing the optimization either!
(Also: it's not a stupid approach. Due to the way the JVM loads things, most of the time you don't know that any particular method won't be overridden later by something that does, in fact, have side effects. There are very few optimizations that could actually be done by the Java compiler.)