[HashTreeCollections] Remove subtree count augmentation #236
Labels
enhancement
New feature or request
HashTreeCollections
Hash-array mapped prefix tree implementations
Node references in persistent collections currently include the count of all items in the corresponding subtree. This makes
index(_:offsetBy:)
an operation with logarithmic complexity, but it wastes a bunch of memory on storing these counts. This is very unlikely to be a worthwhile trade off, as these data structures are unordered, and it seem improbable that someone would want to randomly jump around within them.Remove the count augmentation, to boost memory performance and to make these prefix trees even more competitive in memory use vs the standard
Set
andDictionary
.The text was updated successfully, but these errors were encountered: