-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
The gxhash crate hashes quite a bit faster than ahash, see benchmarks for a comparison.
However, because the with_hasher constructor of whirlwind relies on RandomState as trait bound instead of the usual Hash or BuildHasher, you simply cannot construct a ShardMap with gxhash. For example, the following code:
pub fn new(num_cpus: usize, capacity: usize) -> Self {
let hasher = gxhash::GxBuildHasher::default();
Self {
streams_by_id: Arc::new(ShardMap::with_shards_and_capacity_and_hasher(
num_cpus, capacity, hasher,
)),
}
}Does not compile because hasher is not of type std::hash::random::RandomState.
I don't know how to solve this, so please advise if its even possible to use ShardMap with gxhash.
Thank you
Metadata
Metadata
Assignees
Labels
No labels