Franz Busch
3c373b900c
Use the defines from traits directly
...
Package traits already pass defines with their trait name when building. Instead of adding our own conditional defines based on the traits we can use the trait provided defines directly. I observed that various tooling behaves better with the trait provided defines.
2026-05-06 07:41:02 -07:00
Karoy Lorentey
1c69635852
Add SPDX-License-Identifier tags
2026-03-05 19:39:24 -08:00
Karoy Lorentey
d9b09ecde8
Update copyright dates
2026-03-05 19:39:20 -08:00
Karoy Lorentey
ab649ca5fc
Add new package trait UnstableSortedCollections
...
This re-enables the SortedCollections for easi(er) experimentation.
The module remains source unstable — it may go away entirely or it may receive arbitrary source-breaking changes in any new swift-collections release, with no special pre-announcement.
2025-10-02 17:00:32 -07:00
Karoy Lorentey
d4946c5dcb
Remove obsolete language checks
2025-05-20 15:12:32 -07:00
Karoy Lorentey
9b7c6ecb10
[SortedDictionary] SortedDictionary, .Iterator, .Index, .SubSequence, .SubSequence.Iterator, .Keys, .Keys.Iterator, .Values, .Values.Iterator: Explicitly conform to Sendable when Key and Value are both Sendable
2022-10-05 11:51:19 -07:00
Vihan Bhargava
cf672265c7
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
2021-08-19 00:02:17 -07:00
Vihan Bhargava
5690056991
Add cursor type for imperative tree modification.
...
Key Changes:
- Implement _BTree.Cursor for performing efficient mutations on a tree
Minor Changes:
- New implementation of _BTree.Index and iteration
2021-08-09 19:13:50 -07:00
Vihan Bhargava
9b470c8f92
Initial implementation of SetAlgebra and various refactors.
...
Key Changes:
- SortedSet
- Implement SetAlgebra
- Implement Hashable
- Implement Equatable
- Implement Custom(Debug)StringConvertible
- Implement CustomReflectable
- Implement Codable
- Implement subscript(range: Range<Element>)
- Implement subscript(offset:)
- Implement remove(atOffset:)
Minor Changes:
- Fix inefficiency on SortedDictionary.customMirror
- Optimize to O(1) _BTree.UnsafePath comparator
- Optimize away ARC traffic on findAnyPath(forKey:)
Various additional refactors and renames.
2021-08-09 19:13:50 -07:00
Vihan Bhargava
9cf2cdadc0
Initial commit for SortedCollections
...
Signed-off-by: Vihan Bhargava <vihan_bhargava@apple.com >
2021-08-09 19:13:41 -07:00