Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[HashTreeCollections] Nodes should shrink themselves when possible #229

Open
lorentey opened this issue Oct 28, 2022 · 0 comments
Open

[HashTreeCollections] Nodes should shrink themselves when possible #229

lorentey opened this issue Oct 28, 2022 · 0 comments
Labels
enhancement New feature or request HashTreeCollections Hash-array mapped prefix tree implementations

Comments

@lorentey
Copy link
Member

As the prefix tree grows, items inside nodes are slowly replaced with child references. For some Key/Value combinations, this reduces the size of the node; it would be nice if we allowed nodes to reallocate themselves to get rid of superfluous capacity.

(We should only do this when the load factor of a node shrinks below some predetermined minimum.)

Implementing this would likely slow down insertions somewhat, but in exchange it would allow better memory utilization -- which would probably be a worthwhile trade off to make.

@lorentey lorentey added enhancement New feature or request HashTreeCollections Hash-array mapped prefix tree implementations labels Oct 28, 2022
@lorentey lorentey changed the title [PersistentCollections] Nodes should shrink themselves when possible [HashTreeCollections] Nodes should shrink themselves when possible Nov 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request HashTreeCollections Hash-array mapped prefix tree implementations
Projects
None yet
Development

No branches or pull requests

1 participant