You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed there is no use of contiguous array in the source. Using Array or [T] with classes or protocols results in a type that's compatible with NSArray. Supporting NSArray results in a performance penalty. ContiguousArray is swift-only thus the compiler can optimize it better.
The text was updated successfully, but these errors were encountered:
Accessing any value at a particular index in an array is at worst O(log n), but should usually be O(1).
Searching for an object at an unknown index is at worst O(n (log n)), but will generally be O(n).
Inserting or deleting an object is at worst O(n (log n)) but will often be O(1)
I noticed there is no use of contiguous array in the source. Using Array or [T] with classes or protocols results in a type that's compatible with NSArray. Supporting NSArray results in a performance penalty. ContiguousArray is swift-only thus the compiler can optimize it better.
The text was updated successfully, but these errors were encountered: