<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.10.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Swift",
  "identifier" : "/documentation/Swift/MemoryLayout/stride",
  "metadataVersion" : "0.1.0",
  "role" : "Type Property",
  "symbol" : {
    "kind" : "Type Property",
    "modules" : [
      "Swift"
    ],
    "preciseIdentifier" : "s:s12MemoryLayoutOsRi_zRi0_zrlE6strideSivpZ"
  },
  "title" : "stride"
}
-->

# stride

The number of bytes from the start of one instance of `T` to the start of
the next when stored in contiguous memory or in an `Array<T>`.

```
static var stride: Int { get }
```

## Discussion

This is the same as the number of bytes moved when an `UnsafePointer<T>`
instance is incremented. `T` may have a lower minimal alignment that
trades runtime performance for space efficiency. This value is always
positive.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)