chore(bench): suffix hlapi ops bench with measured type name

This commit is contained in:
David Testé
2025-11-25 12:45:41 +01:00
committed by David Testé
parent 4d6aeebd0c
commit e85fd936d0

View File

@@ -71,7 +71,7 @@ fn bench_fhe_type<FheType>(
let mut bench_id;
bench_id = format!("{bench_prefix}::add::{param_name}::{bit_size}_bits");
bench_id = format!("{bench_prefix}::add::{param_name}::{type_name}");
bench_group.bench_function(&bench_id, |b| {
b.iter(|| {
let res = &lhs + &rhs;
@@ -81,7 +81,7 @@ fn bench_fhe_type<FheType>(
});
write_record(bench_id, "add");
bench_id = format!("{bench_prefix}::overflowing_add::{param_name}::{bit_size}_bits");
bench_id = format!("{bench_prefix}::overflowing_add::{param_name}::{type_name}");
bench_group.bench_function(&bench_id, |b| {
b.iter(|| {
let (res, flag) = lhs.overflowing_add(&rhs);
@@ -91,7 +91,7 @@ fn bench_fhe_type<FheType>(
});
write_record(bench_id, "overflowing_add");
bench_id = format!("{bench_prefix}::overflowing_sub::{param_name}::{bit_size}_bits");
bench_id = format!("{bench_prefix}::overflowing_sub::{param_name}::{type_name}");
bench_group.bench_function(&bench_id, |b| {
b.iter(|| {
let (res, flag) = lhs.overflowing_sub(&rhs);
@@ -101,7 +101,7 @@ fn bench_fhe_type<FheType>(
});
write_record(bench_id, "overflowing_sub");
bench_id = format!("{bench_prefix}::sub::{param_name}::{bit_size}_bits");
bench_id = format!("{bench_prefix}::sub::{param_name}::{type_name}");
bench_group.bench_function(&bench_id, |b| {
b.iter(|| {
let res = &lhs - &rhs;
@@ -111,7 +111,7 @@ fn bench_fhe_type<FheType>(
});
write_record(bench_id, "sub");
bench_id = format!("{bench_prefix}::mul::{param_name}::{bit_size}_bits");
bench_id = format!("{bench_prefix}::mul::{param_name}::{type_name}");
bench_group.bench_function(&bench_id, |b| {
b.iter(|| {
let res = &lhs * &rhs;
@@ -121,7 +121,7 @@ fn bench_fhe_type<FheType>(
});
write_record(bench_id, "mul");
bench_id = format!("{bench_prefix}::bitand::{param_name}::{bit_size}_bits");
bench_id = format!("{bench_prefix}::bitand::{param_name}::{type_name}");
bench_group.bench_function(&bench_id, |b| {
b.iter(|| {
let res = &lhs & &rhs;
@@ -131,7 +131,7 @@ fn bench_fhe_type<FheType>(
});
write_record(bench_id, "bitand");
bench_id = format!("{bench_prefix}::bitor::{param_name}::{bit_size}_bits");
bench_id = format!("{bench_prefix}::bitor::{param_name}::{type_name}");
bench_group.bench_function(&bench_id, |b| {
b.iter(|| {
let res = &lhs | &rhs;
@@ -141,7 +141,7 @@ fn bench_fhe_type<FheType>(
});
write_record(bench_id, "bitor");
bench_id = format!("{bench_prefix}::bitxor::{param_name}::{bit_size}_bits");
bench_id = format!("{bench_prefix}::bitxor::{param_name}::{type_name}");
bench_group.bench_function(&bench_id, |b| {
b.iter(|| {
let res = &lhs ^ &rhs;
@@ -151,7 +151,7 @@ fn bench_fhe_type<FheType>(
});
write_record(bench_id, "bitxor");
bench_id = format!("{bench_prefix}::left_shift::{param_name}::{bit_size}_bits");
bench_id = format!("{bench_prefix}::left_shift::{param_name}::{type_name}");
bench_group.bench_function(&bench_id, |b| {
b.iter(|| {
let res = &lhs << &rhs;
@@ -161,7 +161,7 @@ fn bench_fhe_type<FheType>(
});
write_record(bench_id, "left_shift");
bench_id = format!("{bench_prefix}::right_shift::{param_name}::{bit_size}_bits");
bench_id = format!("{bench_prefix}::right_shift::{param_name}::{type_name}");
bench_group.bench_function(&bench_id, |b| {
b.iter(|| {
let res = &lhs >> &rhs;
@@ -171,7 +171,7 @@ fn bench_fhe_type<FheType>(
});
write_record(bench_id, "right_shift");
bench_id = format!("{bench_prefix}::left_rotate::{param_name}::{bit_size}_bits");
bench_id = format!("{bench_prefix}::left_rotate::{param_name}::{type_name}");
bench_group.bench_function(&bench_id, |b| {
b.iter(|| {
let res = (&lhs).rotate_left(&rhs);
@@ -181,7 +181,7 @@ fn bench_fhe_type<FheType>(
});
write_record(bench_id, "left_rotate");
bench_id = format!("{bench_prefix}::right_rotate::{param_name}::{bit_size}_bits");
bench_id = format!("{bench_prefix}::right_rotate::{param_name}::{type_name}");
bench_group.bench_function(&bench_id, |b| {
b.iter(|| {
let res = (&lhs).rotate_right(&rhs);
@@ -191,7 +191,7 @@ fn bench_fhe_type<FheType>(
});
write_record(bench_id, "right_rotate");
bench_id = format!("{bench_prefix}::min::{param_name}::{bit_size}_bits");
bench_id = format!("{bench_prefix}::min::{param_name}::{type_name}");
bench_group.bench_function(&bench_id, |b| {
b.iter(|| {
let res = lhs.min(&rhs);
@@ -201,7 +201,7 @@ fn bench_fhe_type<FheType>(
});
write_record(bench_id, "min");
bench_id = format!("{bench_prefix}::max::{param_name}::{bit_size}_bits");
bench_id = format!("{bench_prefix}::max::{param_name}::{type_name}");
bench_group.bench_function(&bench_id, |b| {
b.iter(|| {
let res = lhs.max(&rhs);