test(bench): disable callgrind cache simulation in compare_profile

The profiling campaign ranks functions on instruction count (Ir) only,
so callgrind's cache simulation is pure overhead — it roughly doubles
each run's wall time. Pass `--cache-sim=no` via the gungraun
`LibraryBenchmarkConfig` to halve the measure->optimize loop's latency.
This commit is contained in:
2026-05-14 12:01:25 -06:00
parent 740965958f
commit 50501bb01e
+9 -1
View File
@@ -22,6 +22,7 @@
use std::hint::black_box; use std::hint::black_box;
use gungraun::Callgrind;
use gungraun::prelude::*; use gungraun::prelude::*;
#[path = "../examples/_shared/compare_workload.rs"] #[path = "../examples/_shared/compare_workload.rs"]
@@ -37,4 +38,11 @@ library_benchmark_group!(
benchmarks = full_compare_workload benchmarks = full_compare_workload
); );
main!(library_benchmark_groups = compare_group); // `--cache-sim=no`: the campaign ranks functions on instruction count
// (`Ir`) only, so callgrind's cache simulation is pure overhead here —
// disabling it roughly halves each profiling run.
main!(
config = LibraryBenchmarkConfig::default()
.tool(Callgrind::with_args(["--cache-sim=no"])),
library_benchmark_groups = compare_group
);