factored out blackbox in benchmarks

This commit is contained in:
Jean-Philippe Bossuat
2025-06-17 09:52:15 +02:00
parent b93e011347
commit 4455afdabd
2 changed files with 4 additions and 19 deletions

View File

@@ -75,12 +75,7 @@ fn bench_external_product_glwe_fft64(c: &mut Criterion) {
);
move || {
ct_glwe_out.external_product(
black_box(&module),
black_box(&ct_glwe_in),
black_box(&ct_ggsw),
black_box(scratch.borrow()),
);
black_box(ct_glwe_out.external_product(&module, &ct_glwe_in, &ct_ggsw, scratch.borrow()));
}
}
@@ -163,13 +158,7 @@ fn bench_external_product_glwe_inplace_fft64(c: &mut Criterion) {
move || {
let scratch_borrow = scratch.borrow();
(0..687).for_each(|_| {
ct_glwe.external_product_inplace(
black_box(&module),
black_box(&ct_ggsw),
black_box(scratch_borrow),
);
});
black_box(ct_glwe.external_product_inplace(&module, &ct_ggsw, scratch_borrow));
}
}

View File

@@ -81,7 +81,7 @@ fn bench_keyswitch_glwe_fft64(c: &mut Criterion) {
);
move || {
ct_out.automorphism(&module, &ct_in, &ksk, scratch.borrow());
black_box(ct_out.automorphism(&module, &ct_in, &ksk, scratch.borrow()));
}
}
@@ -172,11 +172,7 @@ fn bench_keyswitch_glwe_inplace_fft64(c: &mut Criterion) {
);
move || {
ct.keyswitch_inplace(
black_box(&module),
black_box(&ksk),
black_box(scratch.borrow()),
);
black_box(ct.keyswitch_inplace(&module, &ksk, scratch.borrow()));
}
}