From 34ce8cc05c9bb2b864457acf1ae69136fadf3de5 Mon Sep 17 00:00:00 2001 From: Olivier Giniaux Date: Sat, 18 Nov 2023 15:05:35 +0100 Subject: [PATCH] Add AHash to HashSet benchmark --- benches/hashset.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/benches/hashset.rs b/benches/hashset.rs index f44e0f1..b7a840f 100644 --- a/benches/hashset.rs +++ b/benches/hashset.rs @@ -1,3 +1,4 @@ +use ahash::AHashSet; use criterion::{criterion_group, criterion_main, Criterion}; use fnv::FnvHashSet; use gxhash::*; @@ -35,6 +36,11 @@ fn benchmark_for_string(c: &mut Criterion, string: &str) { b.iter(|| set.insert(string)) }); + let mut set = AHashSet::default(); + group.bench_function("AHash", |b| { + b.iter(|| set.insert(string)) + }); + let mut set = FnvHashSet::default(); group.bench_function("FNV-1a", |b| { b.iter(|| set.insert(string))