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

Introduce FixedUnorderedMap/FixedUnorderedSet #87

Merged
merged 14 commits into from
Feb 26, 2024

Conversation

Bobobalink
Copy link
Contributor

@Bobobalink Bobobalink commented Jan 3, 2024

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.

MODULE.bazel Outdated Show resolved Hide resolved
@Bobobalink Bobobalink force-pushed the fixed_unordered_map branch 3 times, most recently from 9daa13d to 49cadff Compare February 23, 2024 02:14
@alexkaratarakis alexkaratarakis force-pushed the fixed_unordered_map branch 3 times, most recently from afe2999 to dc52292 Compare February 25, 2024 02:43
@alexkaratarakis alexkaratarakis changed the title Add FixedRobinhoodHashtable based on ankerl::UnorderedDense Introduce FixedUnorderedMap/FixedUnorderedSet Feb 25, 2024
Bobobalink and others added 5 commits February 24, 2024 19:56
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 and others added 7 commits February 24, 2024 20:25
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 alexkaratarakis merged commit 095b1bc into teslamotors:main Feb 26, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants