Replace internal hashtable with hashbrown RawTable#287
Merged
Conversation
arthurprs
marked this pull request as draft
October 23, 2023 22:44
arthurprs
force-pushed
the
small-optimizations
branch
from
October 24, 2023 08:42
096023f to
b8ccad8
Compare
arthurprs
force-pushed
the
small-optimizations
branch
from
October 24, 2023 08:55
b8ccad8 to
0f95f59
Compare
arthurprs
marked this pull request as ready for review
October 24, 2023 09:47
Contributor
|
A potentially nicer setup could be to use the new |
Contributor
Author
|
The downside with Hashtable is still has all the lifetimes and that doesn't play well with dashmap lock wrappers. Meaning we keep having to transmute lifetimes at every corner with |
Contributor
|
And now hashbrown 0.15 only offers HashTable and no RawTable API :D |
Contributor
Author
|
If I'm being honest, that came across as a pedantic act from the maintainers. They could have tried to reduce the more problematic surface areas, if there were really any. Now, some crates like this are back to having to fork or use large amounts of lifetime transmutes. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Replace internal hashtable with hashbrown RawTable.
Benefits
The first two can be significant performance improvements in some circumstances.
Sadly, this is a breaking change for raw-api users so it'll require a major version bump.
Maybe the third time is the charm 😄