---
title: stride
framework: swift
role: symbol
role_heading: Type Property
path: swift/memorylayout/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>.

## Declaration

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

## Discussion

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.

## See Also

### Accessing the Layout of a Type

- [size](swift/memorylayout/size.md)
- [alignment](swift/memorylayout/alignment.md)
