Skip to content

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

@RoDmitry

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?

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