Karoy Lorentey
1a4993dfda
[PersistentCollections] Reformat
...
Follow the Standard Library coding style:
- Hard 80 character line limit
- Use two spaces as the indentation unit
- Overlong lines broken up by adding line breaks at the following places
1. After opening delimiters & before closing delimiters
2. Between each item in a list
3. Extracting subexpressions etc as needed
2022-09-07 19:16:41 -07:00
Karoy Lorentey
de5fad7477
Merge pull request #31 from msteindorfer/capsule-collections
...
Incubate persistent data structures
2022-09-07 09:18:23 -07:00
Michael Steindorfer
ccd11e55dd
[Capsule] Clean-up annotations
2022-09-06 21:20:41 +02:00
Michael Steindorfer
e2f53441d6
[Capsule] Add subscript(position:) benchmarks
2022-09-06 20:39:38 +02:00
Michael Steindorfer
868eb2fdcc
[Capsule] Remove comment after check
2022-09-06 16:43:19 +02:00
Michael Steindorfer
49283d3251
[Capsule] Remove unchecked variant of initializer
2022-09-06 16:37:23 +02:00
Michael Steindorfer
26b97f95d2
[Capsule] Unify insertion/deletion methods
...
Note, always tracking discardable result negatively impacts batch
use cases.
2022-09-06 16:11:17 +02:00
Michael Steindorfer
7ea47d711f
[Capsule] Simplify deletion methods
2022-09-06 14:02:54 +02:00
Michael Steindorfer
4e213be00a
[Capsule] Simplify insertion methods
2022-09-06 13:53:58 +02:00
Michael Steindorfer
5bc17ffe84
[Capsule] Rename package to PersistentCollections
2022-09-06 13:22:10 +02:00
Michael Steindorfer
6b905eb928
[Capsule] Implement BitmapIndexedDictionaryNode: CustomStringConvertible
2022-09-06 10:01:25 +02:00
Michael Steindorfer
a4bce51f58
[Capsule] Fix TODO comment
2022-09-06 09:43:21 +02:00
Michael Steindorfer
870e49d67a
[Capsule] Remove not necessary type alias
2022-09-05 21:25:03 +02:00
Michael Steindorfer
e9dec67cc2
[Capsule] Rename base iterators
2022-09-05 21:21:22 +02:00
Michael Steindorfer
45b9d8db26
[Capsule] Use non-materializing data/trie slice views in iterator
2022-09-05 21:11:20 +02:00
Michael Steindorfer
bf224619a5
[Capsule][WIP] Return to monomorphic spine, continued
2022-09-05 20:24:13 +02:00
Michael Steindorfer
81a38b39ca
[Capsule] Add BitmapIndexedDictionaryNode: CustomStringConvertible skeleton
2022-09-05 12:17:18 +02:00
Michael Steindorfer
0550c27fca
[Capsule] Add BitmapIndexedDictionaryNode: CustomDebugStringConvertible skeleton
2022-09-05 12:15:09 +02:00
Károly Lőrentey
41fe772f88
[BitSet] More doc fixes 🤦🏼♂️
2022-09-04 19:27:51 -07:00
Károly Lőrentey
141ef3c706
[BitArray] Use a platform-independent Codable encoding
2022-09-04 19:26:46 -07:00
Károly Lőrentey
a137a71c6f
[BitSet] Use a platform-independent Codable encoding
2022-09-04 19:26:34 -07:00
Karoy Lorentey
9a9d7d87d8
Merge branch 'release/1.0'
...
# Conflicts:
# .swiftpm/xcode/xcshareddata/xcschemes/swift-collections-Package.xcscheme
# Utils/swift-collections.xcworkspace/xcshareddata/xcschemes/Collections.xcscheme
# Utils/swift-collections.xcworkspace/xcshareddata/xcschemes/OrderedCollections.xcscheme
# Utils/swift-collections.xcworkspace/xcshareddata/xcschemes/swift-collections-Package.xcscheme
2022-09-02 15:30:31 -07:00
Michael Steindorfer
26893b1712
[Capsule][WIP] Return to monomorphic spine
2022-09-02 12:19:26 +02:00
Michael Steindorfer
5eb679dff7
[Capsule] Reduce expensive invariant check that slow down testing
2022-09-02 10:13:57 +02:00
Michael Steindorfer
3d4b802ef7
[Capsule] Add specialized subscript(position: Self.Index) method
2022-09-02 09:01:42 +02:00
Michael Steindorfer
cc0f051b74
[Capsule] Revert to AnyObject node representation
...
Fixes an issue with `isTrieNodeKnownUniquelyReferenced` and existential
types.
2022-09-02 09:01:42 +02:00
Michael Steindorfer
fa8afba05a
[Capsule] Convert to TrieNode content and add specialized index
...
Note that this is an intermediate step towards generic heterogeneous
`any` type content.
2022-09-02 09:01:42 +02:00
Michael Steindorfer
b879788d8a
[Capsule] Replace sizePredicate usage by count
2022-09-02 09:01:42 +02:00
Michael Steindorfer
c6b971910f
[Capsule] Replace top-level cachedSize with per node count
2022-09-02 09:01:42 +02:00
Michael Steindorfer
c8a880794d
[Capsule] Simplify initializers
2022-09-02 09:01:42 +02:00
Michael Steindorfer
3b2c061ecf
[Capsule] Backout explicit collision bitmap to simplify codebase
2022-09-02 09:01:42 +02:00
Karoy Lorentey
a9e2276472
Merge pull request #168 from lorentey/cherry-pick-1.0.3
...
Cherry pick recent fixes to release/1.0 in preparation of tagging 1.0.3
2022-09-01 17:21:25 -07:00
Karoy Lorentey
71aa4a39ae
[OrderedDictionary] Resolve spurious(?) call-site ambiguities
2022-08-31 17:57:24 -07:00
Karoy Lorentey
b379fa7aee
[OrderedCollections] Force-inline all _modify accessors
...
(cherry picked from commit ee1b2de06e )
2022-08-31 17:13:53 -07:00
Karoy Lorentey
87c78de6b4
[Deque] Force-inline the subscript’s _modify accessor to work around a performance issue
...
Resolves #164 .
(cherry picked from commit 98cd753866 )
2022-08-31 17:13:53 -07:00
Karoy Lorentey
6cbecdb467
[OrderedSet] Work around weird name lookup issue in compiler
...
Resolves #157 .
(cherry picked from commit 1071b37294 )
2022-08-31 17:13:53 -07:00
Karoy Lorentey
d0f05d5cf5
[OrderedCollection] Use standard temp allocation facility, if available
...
The 5.6 stdlib introduced a new facility for temporary allocations
that promises better performance than direct allocations. Use it when
the toolchain version is above 5.6.
(cherry picked from commit ddb6d141b3 )
2022-08-31 17:13:53 -07:00
Karoy Lorentey
793d326976
[BitSet.Counted] Force-inline _modify accessors
2022-08-31 15:34:08 -07:00
Karoy Lorentey
ee1b2de06e
[OrderedCollections] Force-inline all _modify accessors
2022-08-31 15:31:42 -07:00
Karoy Lorentey
98cd753866
[Deque] Force-inline the subscript’s _modify accessor to work around a performance issue
...
Resolves #164 .
2022-08-31 13:53:52 -07:00
Karoy Lorentey
4dfcc4f9ef
[BitSet] Doc fixes
2022-08-31 13:14:45 -07:00
Karoy Lorentey
464d973bf3
[BitSet] Remove precalculated count. Add BitSet.Counted wrapper for use cases that require it.
...
This results in a significant speedup for both individual
insert/remove operations as well as bulk set operations -
up to 4x.
Use cases that require an O(1) count can use the separate
BitSet.Counted type.
2022-08-31 13:04:51 -07:00
Karoy Lorentey
1c9c9fc664
[BitSet] Validate index passed to subscript in debug builds
2022-08-31 11:37:04 -07:00
Karoy Lorentey
e34bbb8c4c
[BitSet] Add reserveCapacity.
...
This works slightly different as usual, as the input argument
specifies the maximum value we expect to store, not the maximum
count.
2022-08-29 22:40:59 -07:00
Karoy Lorentey
d6e585f84e
[BitSet] Add index validation assertions
...
Only asserts, not preconditions, as passing invalid indices here
cannot lead to out-of-bounds access — we have unconditional
bounds checks later.
2022-08-29 22:40:03 -07:00
Karoy Lorentey
5fe91efeba
[BitArray] Add Codable conformance
2022-08-28 17:32:46 -07:00
Karoy Lorentey
72497fe212
[BitSet] Add Codable conformance
2022-08-28 17:32:33 -07:00
Karoy Lorentey
c02557f717
[BitSet] Add member subscripts
2022-08-28 16:33:50 -07:00
Karoy Lorentey
b5511d3711
[BitSet] Add custom implementation for filter
2022-08-26 14:21:37 -07:00
Karoy Lorentey
b9ea3f0dd3
[BitSet] Add Custom[Debug]StringConvertible, CustomReflectable conformances
2022-08-26 14:21:15 -07:00