Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Stride of an array
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{refimprove|date=December 2009}} In [[computer programming]], the '''stride of an array''' (also referred to as '''increment''', '''pitch''' or '''step size''') is the number of locations in [[computer memory|memory]] between beginnings of successive [[Array data structure|array]] elements, measured in [[byte]]s or in units of the size of the array's elements. The stride cannot be smaller than the element size but can be larger, indicating extra space between elements. An array with stride of exactly the same size as the size of each of its elements is contiguous in memory. Such arrays are sometimes said to have '''unit stride'''. Unit stride arrays are sometimes more efficient than non-unit stride arrays, but non-unit stride arrays can be more efficient for [[2D array|2D]] or [[multi-dimensional array]]s, depending on the effects of [[CPU cache|caching]] and the [[memory access pattern|access pattern]]s used.{{citation needed|date=January 2018}} This can be attributed to the [[Locality of reference|principle of locality]], specifically ''spatial locality''.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)