mirror of
https://github.com/apple/swift-collections
synced 2026-11-29 05:14:20 +00:00
[PersistentSet] Flesh out isSubset/iSuperset/isDisjoint/etc overloads (untested)
This adds an experimental _FastMembershipCheckable protocol to speed up these relationship predicates when possible — having separate overloads for each known collection with a fast containment check is not going to scale for long. This commit also introduces a set of isEqual(to:) methods that generalize ==.
This commit is contained in:
1 parent
00ae83df1e
commit
3d10964905
11 files changed
+223
-10
No files matched your search
@@ -9,6 +9,10 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
import _CollectionsUtilities
|
||||
|
||||
extension BitSet: _FastMembershipCheckable {}
|
||||
|
||||
extension BitSet {
|
||||
/// Creates a new empty bit set with enough storage capacity to store values
|
||||
/// up to the given maximum value without reallocating storage.
|
||||
|
||||
Reference in new issue
Block a user