Subscript access, with an array of indexes, for the multidimensional array.
- iOS 11.0+
- macOS 10.13+
- UIKit for Mac 13.0+Beta
- tvOS 11.0+
- watchOS 4.0+
- Core ML
Using an array of indexes is the most convenient way to access the elements of the array, but it's also the least efficient. If the subscript is used in a loop, avoid creating a new array for each iteration.
You'll get the best performance through direct access, using the indexes and strides to calculate the offset.