Closed GalCohen closed 4 years ago
Hi @lukaskubanek - any thoughts on this addition?
Hi @GalCohen, thanks for your pull request and your patience. In the recent weeks, I was busy launching the app this library was primarily developed for. I’ll come back to this pull request in the next days.
Hi @GalCohen, thanks for this useful addition. I went a step further and added OrderedDictionary.init(minimumCapacity:)
as well as some basic tests covering this functionality.
Further, I’ve changed the logic of OrderedDictionary.capacity
to use the minimum reserved capacity of the underlying types (Array
and Dictionary
) to prevent false reports. The Dictionary
typically allocates larger portions of memory and thus depending on this value might still lead to reallocation of the Array
type.
You can find all changes in the merge commit f303e02f635bf9a28eb605077aa73b346849003a.
Thanks for merging in my PR @lukaskubanek ! Your revisions make sense. Best of luck of with new app!
Seems like a useful addition that exists on standard library types. Hope the implementation is okay!