Skip to content

Improving performance by updating Abseil design #635

Description

@gaujay

I heard that HashMap is based on Google original design for absl::flat_hash_map.

And noticed there was some room for improvement in Abseil implementation, so I rolled out my own (C++) versions with and without tombstones recently, including comparative benchmarks (for llvm, gcc, msvc).

I think Hashbrown/the Rust std lib could also benefit from these improvements (and additional benchmark scenarios)
by updating few things in its current design (based on the model of indivi::flat_wmap). Mainly, it would imply using 8-bits hash fragments instead of 7 to reduce fast performance divergence on high load scenarios (in particular lookup-miss, see graphs curves).

For more details (benchmarks, documentation, impl specifics), please check this thread (in particular the discussion with u/matthieum):
https://www.reddit.com/r/rust/comments/1mloi7k/rust_hashmap_implementationperformance/

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions