Creates an empty dictionary with preallocated space for at least the specified number of elements.
SDK
- Xcode 6.0.1+
Framework
- Swift Standard Library
Declaration
Parameters
minimumCapacity
The minimum number of key-value pairs that the newly created dictionary should be able to store without reallocating its storage buffer.
Discussion
Use this initializer to avoid intermediate reallocations of a dictionary’s storage buffer when you know how many key-value pairs you are adding to a dictionary after creation.