mirror of
https://github.com/apple/swift-collections
synced 2026-11-25 04:37:48 +00:00
Key Changes: - Add custom SubSequences - Custom SortedDictionary.(Keys|Values).Sequence iterator - Add SortedDictionary.modifyValue(forKey:default:_:) Minor Changes: - Update documentation - Various API optimizations - Fix bug where offsetBy:limitedBy: calls did not validate indices - Remove unique initializers with documented duplicate handling behavior. - Implement _Node.UnsafeHandle.append*() methods - SortedSet no longer allocates a 'values' buffer (_Node.Header.values is now optional) Documentation: - Complexity guarantees - BidirectionalCollection conformances - Sequence/IteratorProtocol methods Optimizations: - Add optimized dictionary value mapping (through Node.init(mappingFrom:_:)) - Custom _BTree.forEach - Greater explicit @inline(__always) annotations throughout. - Simplify _BTree: Sequence implementation - Move methods to using _BTree.Builder - _BTree.FixedSizeArray now uses `withUnsafePointer` to prevent branching.