Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
[Merged by Bors] - Immutable sparse sets for metadata storage #4928
[Merged by Bors] - Immutable sparse sets for metadata storage #4928
Changes from 2 commits
767753a
7e85fe6
b49848f
c759212
c46c186
c723c1c
6c7a269
7c9ffed
43f2b0e
89dfb58
3193bc7
0694407
4a881a7
c90b998
84ba5d4
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a chance that we end up realloc-ing our tables on construction in some / all cases, due to the fact that with_capacity isn't guaranteed to allocate exactly
capacity
, butshrink_to_fit
will shrink to capacity?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is, but unless we're constantly making new
Tables
andArchetypes
, the cost IMO is negligible over the lifetime of the app.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The frequency might go up drastically if we start doing "fragmenting relations". In that context the bytes saved might not be worth it. Hard to say what to value more.
I guess if/when we implement fragmenting relations we can let benchmarks decide. But this level of nuance is easy to forget about.