We basically used the (int j = ....) stuff to make sure the JVM does not create an iterator for this kind of work and so produce more GC