Can you consider adding persistent vector data-structure?

Hello folks.

Can you consider adding an implementation for "persistent vector" data structure. That works like an array but with <= O(log n) complexity for all operations. Here are examples.

Please let me know if I'm missing something already exists.

Yes, this would be a very high-value data structure to add to the package! I expect the implementation will most likely be based on (a possibly adapted version of) the same underlying (count-augmented) BTree implementation as will ship for SortedSet/SortedDictionary.

There are preliminary versions of SortedSet & SortedDictionary on the release/1.1 branch now, but they aren't ready for production use yet. The persistent vector implementation would ideally come immediately after work on these two data structures has concluded.

5 Likes

I would also find this very useful! Any word on progress here?

Hello, sorry to bump, but I still would find this very useful to have, and a very sensible addition to Swift. Has there been any progress made on this?