4 ms·
http://en.wikipedia.org/wiki/Locality_of_reference http://en.wikipedia.org/wiki/Locality_of_reference
by machrider 15y ago
http://en.wikipedia.org/wiki/Locality_of_reference http://en.wikipedia.org/wiki/Locality_of_reference
- _delirium 15y agoFrom the top reply, it looks like it's less locality of reference, and more specific details of the cache indexing; when the arrays are allocated differently so the arrays don't alias each others' cache lines, the one-loop version becomes faster again (for some sizes of arrays).