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

Remove double allocations for types registry in domain #80

Open
iboB opened this issue Apr 13, 2023 · 0 comments
Open

Remove double allocations for types registry in domain #80

iboB opened this issue Apr 13, 2023 · 0 comments
Assignees
Labels
performance gotta go fast

Comments

@iboB
Copy link
Owner

iboB commented Apr 13, 2023

Currently the types registry in the domain is a std::set<unique_ptr<type>>. Types are allocated as a single buffer of variable width, and thus cannot be stored by value. So, since, every node in std::set is allocated, we make two allocations per type.

The solution is to implement a custom set of type (BST or RBT) which would allow the type to also hold node information inside. Then there would be a single allocation per type.

@iboB iboB added the performance gotta go fast label Apr 13, 2023
@iboB iboB self-assigned this Apr 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance gotta go fast
Projects
None yet
Development

No branches or pull requests

1 participant