mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-04-08 03:01:12 -04:00
hash_keys bench: use HashSet::with_capacity (#11044)
This commit is contained in:
@@ -161,7 +161,7 @@ where
|
||||
let mut preload = strategy.new_tree(&mut runner).unwrap().current();
|
||||
let mut input = strategy.new_tree(&mut runner).unwrap().current();
|
||||
|
||||
let mut unique_keys = HashSet::new();
|
||||
let mut unique_keys = HashSet::with_capacity(preload.len() + input.len());
|
||||
preload.retain(|(k, _)| unique_keys.insert(k.clone()));
|
||||
input.retain(|(k, _)| unique_keys.insert(k.clone()));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user