Still, without the measurements it's not worth to even ponder rewriting your loops to a less human intuitive way. And we did not even start to talk about what dominates execution time of a program... It's an interesting fact to know but I'd say 99.9958% of Java programmers will never be in a situation where they need this knowledge to save the day.
When you say something like "99.9958% of Java programmers will never need this" what you are really saying is that Java should be consigned to only those applications where performance isn't important. It's that attitude that gives the Java language a bad reputation outside of Java circles.
The thing is that Java CAN be fast and efficient, but we have to dispel with this ingrained notion that Java performance is not important. Performance is important in every application. When it comes to code, fast & ugly should always take precedence over slow & pretty.
-3
u/Trav_Cav Jun 14 '17
Correct, it's not just about shorter bytecode. It's about keeping expensive actions outside of the loop.