In computer programming, the stride of an array (also increment or step size) refers to the number of locations in memory between beginnings of successive array elements, measured in bytes or in units of the size of the array's elements. In another words: stride is number of bytes one has to move to get from one element to the next (or previous) one. Stride cannot be smaller than element size (it would mean that elements are overlapping) but can be larger (indicating extra space between elements).
An array with stride of exactly same size as the size of one of its elements is 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.
Read more about Stride Of An Array: Reasons For Non-unit Stride
Famous quotes containing the words stride and/or array:
“I, in my intricate image, stride on two levels....”
—Dylan Thomas (19141953)
“Any one who knows what the worth of family affection is among the lower classes, and who has seen the array of little portraits stuck over a labourers fireplace ... will perhaps feel with me that in counteracting the tendencies, social and industrial, which every day are sapping the healthier family affections, the sixpenny photograph is doing more for the poor than all the philanthropists in the world.”
—Macmillans Magazine (London, September 1871)