-
Notifications
You must be signed in to change notification settings - Fork 38
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
Introduce FixedUnorderedMap/FixedUnorderedSet #87
Merged
alexkaratarakis
merged 14 commits into
teslamotors:main
from
Bobobalink:fixed_unordered_map
Feb 26, 2024
Merged
Introduce FixedUnorderedMap/FixedUnorderedSet #87
alexkaratarakis
merged 14 commits into
teslamotors:main
from
Bobobalink:fixed_unordered_map
Feb 26, 2024
Conversation
This file contains 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
Bobobalink
force-pushed
the
fixed_unordered_map
branch
from
February 2, 2024 00:39
940a115
to
69f7edb
Compare
Bobobalink
force-pushed
the
fixed_unordered_map
branch
3 times, most recently
from
February 23, 2024 02:14
9daa13d
to
49cadff
Compare
Bobobalink
force-pushed
the
fixed_unordered_map
branch
from
February 24, 2024 03:16
49cadff
to
d0625a7
Compare
alexkaratarakis
force-pushed
the
fixed_unordered_map
branch
from
February 24, 2024 23:08
2af7a89
to
d021a81
Compare
alexkaratarakis
force-pushed
the
fixed_unordered_map
branch
3 times, most recently
from
February 25, 2024 02:43
afe2999
to
dc52292
Compare
alexkaratarakis
changed the title
Add FixedRobinhoodHashtable based on ankerl::UnorderedDense
Introduce FixedUnorderedMap/FixedUnorderedSet
Feb 25, 2024
alexkaratarakis
force-pushed
the
fixed_unordered_map
branch
from
February 25, 2024 03:30
dc52292
to
089d373
Compare
This is an implmentation of a hashtable based on Robin Hood hashing with backwards shift deletion. The code was initially based on Martin Ankerl's `UnorderedDense` and still uses an identical algorithm, but nearly all of it has been rewritten. This is intentionally a bare-bones API, with only the functions required to implement a full-fat Map API.
alexkaratarakis
force-pushed
the
fixed_unordered_map
branch
from
February 25, 2024 04:00
089d373
to
a2f7947
Compare
This uses `FixedRobinhoodHashtable` to implement a standards-compliant `UnorderedMap`. It does this by introducing `FixedMapAdapter`, which is meant to unify different map backends with a simple API. Future work will use this for the existing `FixedMap`.
alexkaratarakis
force-pushed
the
fixed_unordered_map
branch
from
February 25, 2024 04:26
a2f7947
to
095b1bc
Compare
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.
based on ankerl::UnorderedDense
This is based on Martin's dense unordered map using robinhood hashing and backwards shift deletion.
This does intensive surgery to make it a fixed-container, using
FixedDoublyLinkedList
for backing storage. Most of the interface code is removed, leaving only the minimal amount of logic required to implement a general map interface in the future.Additionally, white-box tests are added to inspect the operations on the internal data structures of the map.