Java for-loop optimization

It’s so easy to get fooled by hand-made microbenchmarks – you never know what they actually measure. That’s why there are special tools like JMH. But let’s analyze what happens to the primitive hand-made benchmark: static class HDouble { double value; } public static void main(String[] args) { primitive(); wrapper(); } public static void primitive() … Read more