Final touch up, polishes, and optimizations.

Key Changes:
 - Add duplicate handling functionality to _BTree.Builder
 - Remove transient allocation in SortedDictionary.values _modify
 - Add missing SortedDictionary.Values.subscript _modify
 - Add SortedSet(sortedElements:)
 - Add optimized SetAlgebra implementations
 - Remove remaining high-level offset APIs
 - Various optimizations
 - Expand internal documentation

Minor Changes:
 - Add ability to create dummy node
 - _BTree.Builder.append(key: Key) for sets.
 - Fix bug where findAnyIndex(forKey:) didn't calculate the offset.
 - Remove old, unused files
 - findAnyCursor -> takeCursor (to emphasize consuming nature)
 - Add takeCursor(at: Index)
 - Optimize init(grouping:by:) to use modifyValue to reduce CoW

Optimizations:
 - Use dummy node for transient _modify state rather than allocating new buffer
This commit is contained in:
Vihan Bhargava committed 2021-08-19 00:02:17 -07:00
1 parent e67460c942
commit cf672265c7
30 files changed
+691 -282

No files matched your search

@@ -36,7 +36,6 @@ extension SortedSet {
// MARK: Equatable
extension SortedSet.Index: Equatable {
// TODO: Potentially validate if lhs & rhs aren't pointing to deallocated dictionaries.
@inlinable
public static func ==(lhs: SortedSet.Index, rhs: SortedSet.Index) -> Bool {
lhs._index.ensureValid(with: rhs._index)