Skip to content

Commit b06d847

Browse files
committed
add benches
1 parent b71347f commit b06d847

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

benches/multiple_right_hand_sides.rs

+31
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,37 @@ fn bench_double_exp_no_noise_mrhs(c: &mut Criterion) {
9999
criterion::BatchSize::SmallInput,
100100
)
101101
});
102+
103+
group.bench_function("Handcrafted Model (MRHS) [multithreaded]", |bencher| {
104+
bencher.iter_batched(
105+
|| {
106+
build_problem_mrhs(
107+
true_parameters.clone(),
108+
DoubleExpModelWithConstantOffsetSepModel::new(x.clone(), tau_guess),
109+
)
110+
.into_parallel()
111+
},
112+
run_minimization_mrhs,
113+
criterion::BatchSize::SmallInput,
114+
)
115+
});
116+
117+
group.bench_function("Using Model Builder (MRHS) [multithreaded]", |bencher| {
118+
bencher.iter_batched(
119+
|| {
120+
build_problem_mrhs(
121+
true_parameters.clone(),
122+
get_double_exponential_model_with_constant_offset(
123+
x.clone(),
124+
vec![tau_guess.0, tau_guess.1],
125+
),
126+
)
127+
.into_parallel()
128+
},
129+
run_minimization_mrhs,
130+
criterion::BatchSize::SmallInput,
131+
)
132+
});
102133
}
103134

104135
criterion_group!(

0 commit comments

Comments
 (0)