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

Improve Memory Usage for Empty Nodes #9

Open
SSoelvsten opened this issue Dec 29, 2022 · 0 comments
Open

Improve Memory Usage for Empty Nodes #9

SSoelvsten opened this issue Dec 29, 2022 · 0 comments
Labels
📁 anatree good first issue Good for newcomers ✨ optimisation It's all about speed / space

Comments

@SSoelvsten
Copy link
Owner

SSoelvsten commented Dec 29, 2022

Currently, for each node we have a std::unordered_set<...> initialized. Yet, many of these nodes may be empty. Hence, we should move it behind a std::unique_ptr<...> to decrease the initialisation and memory cost of each node.

Yet, first we should look into:

  • How many empty nodes actually exist when creating an Anatree for common dictionaries?
  • Can the std::unordered_set<...> already be set up with no initial capacity?
@SSoelvsten SSoelvsten added 📁 anatree ✨ optimisation It's all about speed / space duplicate This issue or pull request already exists good first issue Good for newcomers and removed duplicate This issue or pull request already exists labels Dec 29, 2022
@SSoelvsten SSoelvsten pinned this issue Dec 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📁 anatree good first issue Good for newcomers ✨ optimisation It's all about speed / space
Projects
None yet
Development

No branches or pull requests

1 participant