Skip to content

Is it necessary to store and check keys? For collisions? #4

Description

@RoDmitry

I want to try out mphf, but I don't understand how it handles collisions. Are collisions for never seen keys can happen? Maybe add this info to the mphf docs somewhere.

if self.keys.get_unchecked(idx) == key {
// SAFETY: `idx` and `value_idx` are always within bounds (ensure during construction)
let value_idx = *self.values_index.get_unchecked(idx);
Some(self.values_dict.get_unchecked(value_idx))
} else {
None
}

What is this keys check for?

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