factor::benches::table: Match BenchmarkId w/ criterion's conventions
See
@@ -28,10 +28,7 @@ fn table(c: &mut Criterion) {
group.throughput(Throughput::Elements(INPUT_SIZE as _));
for a in inputs.take(10) {
let a_str = format!("{:?}", a);
- group.bench_with_input(
- BenchmarkId::from_parameter("chunked_".to_owned() + &a_str),
- &a,
- |b, &a| {
+ group.bench_with_input(BenchmarkId::new("factor_chunk", &a_str), &a, |b, &a| {
b.iter(|| {
let mut n_s = a.clone();
let mut f_s: [_; INPUT_SIZE] = array_init(|_| Factors::one());
@@ -39,12 +36,8 @@ fn table(c: &mut Criterion) {
factor_chunk(n_s.try_into().unwrap(), f_s.try_into().unwrap())
}
})
- },
- );
- group.bench_with_input(
- BenchmarkId::from_parameter("seq_".to_owned() + &a_str),
- &a,
- |b, &a| {
+ });
+ group.bench_with_input(BenchmarkId::new("factor", &a_str), &a, |b, &a| {
b.iter(|| {
let mut n_s = a.clone();
let mut f_s: [_; INPUT_SIZE] = array_init(|_| Factors::one());
@@ -52,8 +45,7 @@ fn table(c: &mut Criterion) {
factor(n, f)
}
})
- },
- );
+ });
}
group.finish()
}
