Reserves enough space to store the specified number of elements.
- Xcode 9.0+
- Swift Standard Library
The requested number of elements to store.
If you are adding a known number of elements to a set, use this method to avoid multiple reallocations. This method ensures that the set has unique, mutable, contiguous storage, with space allocated for at least the requested number of elements.
reserve method on a set with bridged storage triggers a copy to contiguous storage even if the existing storage has room to store