llvm-project/third-party/benchmark/docs/random_interleaving.md
Mircea Trofin 5dda2efde5 Re-Reland "[benchmarks] Move libcxx's fork of google/benchmark and llvm/utils'"
This reverts commit b2fbd45d2395f1f6ef39db72b7156724fc101e40. D114922
fixed the reason of the 2nd revert.

This patch also re-applies 39e9f5d3685f3cfca0df072928ad96d973704dff.

Differential Revision: https://reviews.llvm.org/D112012
2021-12-07 17:10:41 -08:00

647 B

Random Interleaving

Random Interleaving is a technique to lower run-to-run variance. It randomly interleaves repetitions of a microbenchmark with repetitions from other microbenchmarks in the same benchmark test. Data shows it is able to lower run-to-run variance by 40% on average.

To use, you mainly need to set --benchmark_enable_random_interleaving=true, and optionally specify non-zero repetition count --benchmark_repetitions=9 and optionally decrease the per-repetition time --benchmark_min_time=0.1.