Most of the time, the memory system sets the speed limit, not the arithmetic. Therefore, how you lay out data often matters more than how you write the loop that reads it. In Java, that choice shows up in a very ordinary question: do you keep an array of objects, or several arrays of primitives? …