benchmark
benchmark copied to clipboard
Align benchmark::State to a cacheline.
This can avoid interference with neighboring objects and stabilize benchmark results.
@dominichamon Another reason to have absl dependency :) Would make this PR so much simpler.
do you have the results from a run with and without this change?
@dominichamon I only have an internal microbenchmark, which demonstrated higher variability across runs (especially when combined with a change to TCMalloc) without the alignment attribute.
This seems plausible (although hard to tell without a test), but is this only about the State
?
What about ThreadTimer
, ThreadManager
, PerfCountersMeasurement
?