blob: fd04578119983c4269a80c50da14e13321422838 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
use criterion::BenchmarkId;
use criterion::Criterion;
use criterion::{criterion_group, criterion_main};
fn bench_sieve(c: &mut Criterion) {
let size: usize = 10;
c.bench_with_input(BenchmarkId::new("prime_sieve", size), &size, |b, &n| {
b.iter(|| prime_sieve::prime_sieve(n));
});
}
criterion_group!(benches, bench_sieve);
criterion_main!(benches);
|