Skip to content

Commit 2e2ca37

Browse files
committed
Revert "fix: add more opaque black boxes in the tests"
This reverts commit ac7e208.
1 parent bb6087f commit 2e2ca37

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

crates/criterion_compat/benches/criterion_integration/compare_functions.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use codspeed_criterion_compat::{black_box, criterion_group, BenchmarkId, Criterion};
1+
use codspeed_criterion_compat::{criterion_group, BenchmarkId, Criterion};
22

33
fn fibonacci_slow(n: u64) -> u64 {
44
match n {
@@ -27,16 +27,14 @@ fn fibonacci_fast(n: u64) -> u64 {
2727
fn compare_fibonaccis(c: &mut Criterion) {
2828
let mut group = c.benchmark_group("Fibonacci");
2929

30-
group.bench_with_input("Recursive", &20, |b, i| {
31-
b.iter(|| fibonacci_slow(black_box(*i)))
32-
});
30+
group.bench_with_input("Recursive", &20, |b, i| b.iter(|| fibonacci_slow(*i)));
3331
group.bench_with_input("Iterative", &20, |b, i| b.iter(|| fibonacci_fast(*i)));
3432
}
3533
fn compare_fibonaccis_group(c: &mut Criterion) {
3634
let mut group = c.benchmark_group("Fibonacci3");
3735
for i in 20..=21 {
3836
group.bench_with_input(BenchmarkId::new("Recursive", i), &i, |b, i| {
39-
b.iter(|| fibonacci_slow(black_box(*i)))
37+
b.iter(|| fibonacci_slow(*i))
4038
});
4139
group.bench_with_input(BenchmarkId::new("Iterative", i), &i, |b, i| {
4240
b.iter(|| fibonacci_fast(*i))

0 commit comments

Comments
 (0)