Skip to main content

hash_string_masked

Function hash_string_masked 

Source
pub fn hash_string_masked(s: &str, bound: u64) -> u64
Expand description

Hash s into the range [0, bound] (inclusive) by masking with bound. Caller passes bound = (1 << bits) - 1 for power-of-two curve buckets, or extent - 1 style values for tile bucketing (where bound + 1 is a power of two); for arbitrary bound, callers should use hash_string_modulo instead.