[SR-2909] Array should have an initializer that reserves capacity #45503
Labels
feature
A feature request or implementation
improvement
standard library
Area: Standard library umbrella
swift evolution implemented
Flag → feature: A feature that was approved through the Swift evolution process and implemented
Additional Detail from JIRA
md5: ebb4e496b3292639eda6001214f4d056
is duplicated by:
Issue Description:
When knowing an array will immediately be filled with a specific count of items it is often common to write:
it would be nice to have an initializer that reserves capacity (since it would be similar to other allocation paths of buffers)
trivially this could be written as:
The text was updated successfully, but these errors were encountered: