pointfreeco / swift-identified-collections

A library of data structures for working with collections of identifiable elements in an ergonomic, performant way.
MIT License
539 stars 46 forks source link

Use a half stable partition for move/remove performance #16

Closed stephencelis closed 3 years ago

stephencelis commented 3 years ago

@lorentey Commented here that we're using move/remove methods with pretty bad performance (which we knew):

https://github.com/apple/swift-collections/issues/66#issuecomment-891327430

I took this code (with minor changes) from here: https://stackoverflow.com/a/56693340