Algorithm icon indicating copy to clipboard operation
Algorithm copied to clipboard

Discussion about dropping some collections

Open adamdahan opened this issue 3 years ago • 2 comments

Let's leverage instead of re-write Apple collections: https://github.com/apple/swift-collections.git

I want to add these collections by adding swift-collections as a dependency.

Deque<Element>, a double-ended queue backed by a ring buffer. Deques are range-replaceable, mutable, random-access collections.

OrderedSet<Element>, a variant of the standard Set where the order of items is well-defined and items can be arbitrarily reordered. Uses a ContiguousArray as its backing store, augmented by a separate hash table of bit packed offsets into it.

OrderedDictionary<Key, Value>, an ordered variant of the standard Dictionary, providing similar benefits.

In lieu of:

  • Deque
  • SortedDictionary

adamdahan avatar Dec 22 '21 15:12 adamdahan

Sounds great! Would you like to submit a PR for this, and is there anything I can do to help you move this forward?

daniel-jonathan avatar Dec 22 '21 16:12 daniel-jonathan

Nope, I got it. Thnx.

adamdahan avatar Dec 22 '21 17:12 adamdahan