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

Make hamt value type generic and add benchmarks #635

Merged
merged 8 commits into from
Aug 28, 2020

Conversation

austinabell
Copy link
Contributor

Summary of changes
Changes introduced in this pull request:

  • Seems like this is the best solution for Optimize HAMT to not deserialize values internally #391. Previously, there was multiple value types in one hamt, but that is not the case anymore it seems and we cannot leave bytes serialized when using Serde (go implementation uses a deferred type for this which avoids deserializing until needed but this is almost impossible without replacing serde for serialization for the hamt).
  • Adds benchmarks to the hamt

This will be pointed at hashing branch until #624 comes in (didn't want to deal with conflicts) and I will open when it's pointing back at main

benchmarks:

HAMT bulk insert (no flush)
                        time:   [39.967 us 40.263 us 40.560 us]
                        change: [-63.784% -63.178% -62.603%] (p = 0.00 < 0.05)
                        Performance has improved.

HAMT bulk insert with flushing and loading
                        time:   [2.2143 ms 2.2285 ms 2.2429 ms]
                        change: [-65.130% -64.540% -64.033%] (p = 0.00 < 0.05)
                        Performance has improved.

HAMT deleting all nodes time:   [75.801 us 76.273 us 76.734 us]
                        change: [-71.930% -71.549% -71.206%] (p = 0.00 < 0.05)
                        Performance has improved.

HAMT for_each function  time:   [58.529 us 59.057 us 59.562 us]
                        change: [-84.056% -83.806% -83.585%] (p = 0.00 < 0.05)
                        Performance has improved.

Reference issue to close (if applicable)

Closes #202
Closes #391

Other information and links

Base automatically changed from austin/hamt/hashing to main August 20, 2020 19:52
@@ -29,3 +29,9 @@ murmur = ["murmur3"]

[dev-dependencies]
hex = "0.4.2"
criterion = "0.3.1"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not that is matters too much but the latest version 0.3.3 I believe.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

patch versions get automatically bumped to the most up to date (if you look inside of the Cargo.lock you'll see the version is actually 0.3.3) but I will update this for peace of mind

@austinabell austinabell merged commit 5db465c into main Aug 28, 2020
@austinabell austinabell deleted the austin/hamt/serandbench branch August 28, 2020 13:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Optimize HAMT to not deserialize values internally Add benchmarks to AMT/HAMT
3 participants