Skip to content

Commit

Permalink
chore(bench): add new parameter sets to bench
Browse files Browse the repository at this point in the history
  • Loading branch information
jborfila committed Aug 9, 2023
1 parent 1f95e2d commit c58b0a3
Showing 1 changed file with 16 additions and 10 deletions.
26 changes: 16 additions & 10 deletions tfhe/benches/boolean/bench.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,16 @@ use tfhe::boolean::parameters::{
BooleanParameters, DEFAULT_PARAMETERS, PARAMETERS_ERROR_PROB_2_POW_MINUS_165,
PARAMETERS_ERROR_PROB_2_POW_MINUS_165_KS_PBS,
};
use tfhe::boolean::prelude::{BinaryBooleanGates, DEFAULT_PARAMETERS_KS_PBS};
use tfhe::boolean::prelude::{BinaryBooleanGates, DEFAULT_PARAMETERS_KS_PBS, TFHE_LIB_PARAMETERS};
use tfhe::boolean::server_key::ServerKey;

criterion_group!(
gates_benches,
bench_default_parameters,
bench_tfhe_lib_parameters,
bench_default_parameters_ks_pbs,
bench_tfhe_lib_parameters_pbs,
bench_low_prob_parameters,
bench_low_prob_parameters_ks_pbs,
bench_tfhe_lib_parameters,
);

criterion_main!(gates_benches);
Expand Down Expand Up @@ -84,21 +85,26 @@ fn bench_default_parameters(c: &mut Criterion) {
benchs(c, DEFAULT_PARAMETERS, "DEFAULT_PARAMETERS");
}

fn bench_tfhe_lib_parameters(c: &mut Criterion) {
fn bench_default_parameters_ks_pbs(c: &mut Criterion) {
benchs(c, DEFAULT_PARAMETERS_KS_PBS, "DEFAULT_PARAMETERS_KS_PBS");
}

fn bench_low_prob_parameters(c: &mut Criterion) {
benchs(
c,
PARAMETERS_ERROR_PROB_2_POW_MINUS_165,
"TFHE_LIB_PARAMETERS",
"PARAMETERS_ERROR_PROB_2_POW_MINUS_165_KS_PBS",
);
}
fn bench_default_parameters_ks_pbs(c: &mut Criterion) {
benchs(c, DEFAULT_PARAMETERS_KS_PBS, "DEFAULT_PARAMETERS_KS_PBS");
}

fn bench_tfhe_lib_parameters_pbs(c: &mut Criterion) {
fn bench_low_prob_parameters_ks_pbs(c: &mut Criterion) {
benchs(
c,
PARAMETERS_ERROR_PROB_2_POW_MINUS_165_KS_PBS,
"TFHE_LIB_PARAMETERS_KS_PBS",
"PARAMETERS_ERROR_PROB_2_POW_MINUS_165_KS_PBS",
);
}

fn bench_tfhe_lib_parameters(c: &mut Criterion) {
benchs(c, TFHE_LIB_PARAMETERS, " TFHE_LIB_PARAMETERS");
}

0 comments on commit c58b0a3

Please sign in to comment.