Karoy Lorentey

Results 247 comments of Karoy Lorentey

It seems to me `SparseSet` probably wouldn't be the best choice for storing small integers though -- a fixed-size `BitSet` would be generally faster* & use far less memory. *...

Adopting these APIs as they are isn't going to work due to a layering violation: these methods use `IndexSet`, which is a Foundation type. (Swift Collections is intended to be...

Quick followup: I forgot to state above that this functionality would be very much desirable for both OrderedSet and OrderedDictionary.Elements -- the issue is simply that we should start by...

I think it makes sense to leave this open, if only to remind us to revisit this once the dust has settled around `RangeSet`. Re pointfreeco/swift-identified-collections#16: I suspect the move...

"Bag" is a [well-established name](https://en.wikipedia.org/wiki/Multiset) for a set that allows duplicates; it's less clinical sounding as "multiset", but that is definitely a viable name for it. (For what it's worth,...

I think I'd prefer to start with an implementation that simply relied on the `Comparable` conformance of its element type. From what I've seen, heaps are very often populated with...

> Given that min-max heaps let us avoid having to encode the sort order into the type, does it make sense to go with @pyrtsa's suggestion of using key paths...

Quick note: The snippet above used to have an incorrect copyright notice. This notices in this repository read `Copyright (c) Apple Inc. and the Swift project authors`.

Yep, this is something we'd be interested in adding. I think one major additional inspiration for the implementation could be [LLVM's SparseSet implementation](https://github.com/llvm/llvm-project/blob/main/llvm/include/llvm/ADT/SparseSet.h) which @milseman says is an implementation of...

Yep -- counted multisets are useful, and they would be an interesting API design exercise! I think an _unordered_ counted multiset that stores its contents in a `Dictionary` might be...