Non-consecutive array access may impact performance.
Accessing an array in a non-consecutive order is less efficient than accessing consecutive positions because the latter maximises data locality. Maximizing data locality increases the performance thanks to the cache levels available in modern processors.
Consider using techniques like loop fusion, loop interchange, loop tiling or changing the data layout to avoid non-sequential access in hot loops.
Get started with Parallelware Analyzer today
Boost the performance of your code