Exclude executor teardown from the measured bench regions

This commit is contained in:
Dennis Kobert
2026-08-27 10:09:18 +00:00
parent 084f14e973
commit 20e70e7bc9
3 changed files with 8 additions and 8 deletions
@@ -12,9 +12,9 @@ fn run_once(c: &mut Criterion) {
bench_for_each_demo(&mut group, |name, g| {
let (_, network) = setup_network(name);
g.bench_function(name, |b| {
b.iter_batched(
b.iter_batched_ref(
|| DynamicExecutor::new(network.clone()).unwrap(),
|executor| Executor::execute(&&executor, std::hint::black_box(context)).unwrap(),
|executor| Executor::execute(&&*executor, std::hint::black_box(context)).unwrap(),
criterion::BatchSize::LargeInput,
)
});