Skip to content

Commit

Permalink
Add AHash to HashSet benchmark
Browse files Browse the repository at this point in the history
  • Loading branch information
ogxd committed Nov 18, 2023
1 parent 1230072 commit 34ce8cc
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions benches/hashset.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use ahash::AHashSet;
use criterion::{criterion_group, criterion_main, Criterion};
use fnv::FnvHashSet;
use gxhash::*;
Expand Down Expand Up @@ -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))
Expand Down

0 comments on commit 34ce8cc

Please sign in to comment.