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

Map unification into SlottedArray #131

Merged
merged 8 commits into from
Aug 21, 2023
Merged

Map unification into SlottedArray #131

merged 8 commits into from
Aug 21, 2023

Conversation

Scooletz
Copy link
Contributor

@Scooletz Scooletz commented Aug 21, 2023

This PR removes the previously introduced HashingMap, unifying all the maps into a single SlottedArray component.

Beside unification, it also simplifies the implementation by introducing the hash-based behavior. This has some impact on the size, as entries will not have initial nibbles extracted to the Slot.Prefix, but overall should increase readability and simplicity of the implementation. Additionally, hash based addressing, should have much smaller number of collisions.

The last bust not least, this PR introduces NibblePath.GetHashCode with some benchmarks. This is the actual hashing mechanism used for storing data in the database.

Warning: it makes the db BIG for now

@Scooletz Scooletz changed the title Map unification Map unification into SlottedArray Aug 21, 2023
@github-actions
Copy link

Code Coverage

Package Line Rate Branch Rate Health
Paprika 88% 78%
Summary 88% (2180 / 2468) 78% (558 / 714)

Minimum allowed line rate is 75%

@Scooletz Scooletz marked this pull request as ready for review August 21, 2023 12:50
@Scooletz Scooletz mentioned this pull request Aug 21, 2023
5 tasks
@Scooletz Scooletz merged commit f294fc2 into main Aug 21, 2023
2 checks passed
@Scooletz Scooletz deleted the map-unification branch August 21, 2023 12:50
@Scooletz Scooletz added 🐌 performance Perofrmance related issue 💾 disk size A change makes the disk size smaller and removed 🐌 performance Perofrmance related issue labels Aug 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💾 disk size A change makes the disk size smaller
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant