Open jswrenn opened 4 days ago
All adaptors bounded by Hash would potentially benefit from a with_hasher variant that allowed supplying a faster Hasher (e.g., ahash or fxhash):
Hash
with_hasher
Hasher
ahash
fxhash
duplicates_with_hasher
duplicates_by_with_hasher
unique_with_hasher
unique_by_with_hasher
all_unique_with_hasher
into_group_map_with_hasher
into_group_map_by_with_hasher
into_grouping_map_with_hasher
into_grouping_map_by_with_hasher
counts_with_hasher
counts_by_with_hasher
Implementing each of these is a three step process:
S = RandomState
where S: BuildHasher
HashMap::new
HashMap::default
hash_builder: S
Itertools
All adaptors bounded by
Hash
would potentially benefit from awith_hasher
variant that allowed supplying a fasterHasher
(e.g.,ahash
orfxhash
):duplicates_with_hasher
duplicates_by_with_hasher
unique_with_hasher
unique_by_with_hasher
all_unique_with_hasher
into_group_map_with_hasher
into_group_map_by_with_hasher
into_grouping_map_with_hasher
into_grouping_map_by_with_hasher
counts_with_hasher
counts_by_with_hasher
Implementing each of these is a three step process:
S = RandomState
generic parameter to the adaptor type,where S: BuildHasher
HashMap::new
andHashMap::default
with HashMap::with_hasherhash_builder: S
parameter.with_hasher
adaptor toItertools
with ahash_builder: S
parameter that's passed to the internal constructor.with_hasher
variant.with_hasher
Itertools
method to defer to thewith_hasher
variant.