diff --git a/crates/criterion_compat/benches/criterion_integration/compare_functions.rs b/crates/criterion_compat/benches/criterion_integration/compare_functions.rs index 7a2563b..5c9bec4 100644 --- a/crates/criterion_compat/benches/criterion_integration/compare_functions.rs +++ b/crates/criterion_compat/benches/criterion_integration/compare_functions.rs @@ -1,4 +1,4 @@ -use codspeed_criterion_compat::{black_box, criterion_group, BenchmarkId, Criterion}; +use codspeed_criterion_compat::{criterion_group, BenchmarkId, Criterion}; fn fibonacci_slow(n: u64) -> u64 { match n { @@ -27,16 +27,14 @@ fn fibonacci_fast(n: u64) -> u64 { fn compare_fibonaccis(c: &mut Criterion) { let mut group = c.benchmark_group("Fibonacci"); - group.bench_with_input("Recursive", &20, |b, i| { - b.iter(|| fibonacci_slow(black_box(*i))) - }); + group.bench_with_input("Recursive", &20, |b, i| b.iter(|| fibonacci_slow(*i))); group.bench_with_input("Iterative", &20, |b, i| b.iter(|| fibonacci_fast(*i))); } fn compare_fibonaccis_group(c: &mut Criterion) { let mut group = c.benchmark_group("Fibonacci3"); for i in 20..=21 { group.bench_with_input(BenchmarkId::new("Recursive", i), &i, |b, i| { - b.iter(|| fibonacci_slow(black_box(*i))) + b.iter(|| fibonacci_slow(*i)) }); group.bench_with_input(BenchmarkId::new("Iterative", i), &i, |b, i| { b.iter(|| fibonacci_fast(*i))