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

Change Dictionary's internal data structure to trie #48

Open
dahlia opened this issue Oct 26, 2021 · 1 comment
Open

Change Dictionary's internal data structure to trie #48

dahlia opened this issue Oct 26, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@dahlia
Copy link
Contributor

dahlia commented Oct 26, 2021

Currently Dictionary is a thin wrapper around ImmutableDictionry<K, V> (data structure wise). However, it does not share common data between copies, which is highly inefficient both space-wise and time-wise. I believe the memory consumption of Bencodex can be significantly reduced by changing its internal data structure to a trie which shares mutual data between instances rather than a naive hash map. As it would require much less memcpy, I expect it will be even faster than as is.

@dahlia dahlia added the enhancement New feature or request label Oct 26, 2021
@dahlia
Copy link
Contributor Author

dahlia commented Oct 26, 2021

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant