Skip to content

Commit

Permalink
clippy cache improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
matt-o-how committed Aug 1, 2024
1 parent b0ed2e9 commit 1422d6f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions crates/chia-bls/benches/cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ fn cache_benchmark(c: &mut Criterion) {
});

// populate 10% of keys
bls_cache.aggregate_verify(pks[0..100].into_iter().zip([&msg].iter().cycle()), &agg_sig);
bls_cache.aggregate_verify(pks[0..100].iter().zip([&msg].iter().cycle()), &agg_sig);
c.bench_function("bls_cache.aggregate_verify, 10% cache hits", |b| {
let mut cache = bls_cache.clone();
b.iter(|| {
Expand All @@ -51,7 +51,7 @@ fn cache_benchmark(c: &mut Criterion) {

// populate another 10% of keys
bls_cache.aggregate_verify(
pks[100..200].into_iter().zip([&msg].iter().cycle()),
pks[100..200].iter().zip([&msg].iter().cycle()),
&agg_sig,
);
c.bench_function("bls_cache.aggregate_verify, 20% cache hits", |b| {
Expand All @@ -67,7 +67,7 @@ fn cache_benchmark(c: &mut Criterion) {

// populate another 30% of keys
bls_cache.aggregate_verify(
pks[200..500].into_iter().zip([&msg].iter().cycle()),
pks[200..500].iter().zip([&msg].iter().cycle()),
&agg_sig,
);
c.bench_function("bls_cache.aggregate_verify, 50% cache hits", |b| {
Expand All @@ -83,7 +83,7 @@ fn cache_benchmark(c: &mut Criterion) {

// populate all other keys
bls_cache.aggregate_verify(
pks[500..1000].into_iter().zip([&msg].iter().cycle()),
pks[500..1000].iter().zip([&msg].iter().cycle()),
&agg_sig,
);
c.bench_function("bls_cache.aggregate_verify, 100% cache hits", |b| {
Expand Down

0 comments on commit 1422d6f

Please sign in to comment.