-
Notifications
You must be signed in to change notification settings - Fork 726
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove hashbrown from trie cache. #2632
Conversation
Can you explain why are we changing this? Is it because the hash map from
instead, which would still use Here's an example program to demonstrate: use core::hash::BuildHasher;
use core::hash::Hasher;
fn main() {
println!("ahash::AHashSet");
for _ in 0..2 {
let mut h = ahash::AHashSet::<i32>::new();
let mut hs = h.hasher();
let mut hh = hs.build_hasher();
hh.write_u32(1234);
println!(" {:?}", hh.finish());
}
println!("std::collections::HashSet");
for _ in 0..2 {
let mut h = std::collections::HashSet::<i32>::new();
let mut hs = h.hasher();
let mut hh = hs.build_hasher();
hh.write_u32(1234);
println!(" {:?}", hh.finish());
}
println!("hashbrown::HashSet");
for _ in 0..2 {
let mut h = hashbrown::HashSet::<i32>::new();
let mut hs = h.hasher();
let mut hh = hs.build_hasher();
hh.write_u32(1234);
println!(" {:?}", hh.finish());
}
} Result:
|
Yeah, I also told @cheme the same. But in general, I don't see any big problem of just removing |
Yes, it is totally right to use hashbrown. (when I write this I did check hashbrown code on a local fork that was reallly outdated and it was still using comptime_rand, but it is not the case anymore since 2020 :). I only let the PR to avoid having hashbrown dependency here (one less dep in the Cargo.toml), but it really don't have to be merge, so just to lower deps number. |
Well, ultimately even if you do remove the Anyway, you can remove |
Of course, this should not change the actual generated code (only make sense so user/reader don't ask themselve why we have hashbrown and also for version mgmt even if if we want to strictly check speed at each version update it may make sense to keep hashbrown). |
Can you please do this @cheme? |
Sure (I kind of miss the info 🙈) |
@koute please. |
Using hashmap instead (hashset do not expose entry), to get the default random hasher her.
* relayer_reward_per_message is now Option<RelayerRewardAtSource> * fixed benchmarks compilation
* relayer_reward_per_message is now Option<RelayerRewardAtSource> * fixed benchmarks compilation
* relayer_reward_per_message is now Option<RelayerRewardAtSource> * fixed benchmarks compilation
* relayer_reward_per_message is now Option<RelayerRewardAtSource> * fixed benchmarks compilation
* relayer_reward_per_message is now Option<RelayerRewardAtSource> * fixed benchmarks compilation
* relayer_reward_per_message is now Option<RelayerRewardAtSource> * fixed benchmarks compilation
* relayer_reward_per_message is now Option<RelayerRewardAtSource> * fixed benchmarks compilation
* relayer_reward_per_message is now Option<RelayerRewardAtSource> * fixed benchmarks compilation
* relayer_reward_per_message is now Option<RelayerRewardAtSource> * fixed benchmarks compilation
* relayer_reward_per_message is now Option<RelayerRewardAtSource> * fixed benchmarks compilation
* relayer_reward_per_message is now Option<RelayerRewardAtSource> * fixed benchmarks compilation
* relayer_reward_per_message is now Option<RelayerRewardAtSource> * fixed benchmarks compilation
* relayer_reward_per_message is now Option<RelayerRewardAtSource> * fixed benchmarks compilation
* relayer_reward_per_message is now Option<RelayerRewardAtSource> * fixed benchmarks compilation
* relayer_reward_per_message is now Option<RelayerRewardAtSource> * fixed benchmarks compilation
* relayer_reward_per_message is now Option<RelayerRewardAtSource> * fixed benchmarks compilation
* relayer_reward_per_message is now Option<RelayerRewardAtSource> * fixed benchmarks compilation
* relayer_reward_per_message is now Option<RelayerRewardAtSource> * fixed benchmarks compilation
Using hashmap instead (hashset do not expose entry), to get the default random hasher her.