Labels

Wednesday, April 28, 2010

Stride of an array

In computer programming, the stride of an array (also increment or step size) refers to the number of locations in memory between successive array elements, measured in bytes or in units of the size of the array's elements.

An array with stride 1 has elements which are contiguous in memory. Such arrays are sometimes said to have unit stride. Unit stride arrays are generally more efficient than non-unit stride arrays, due to the effects of caching. This is attributed to the Principle of Locality, specifically spatial locality

Unit stride array

An array whose elements are stored contiguously in memory. Unit stride arrays are more efficient with respect to caches than nonunit stride arrays are.

No comments:

Post a Comment