xref: /aosp_15_r20/external/google-benchmark/docs/random_interleaving.md (revision dbb99499c3810fa1611fa2242a2fc446be01a57c)
1<a name="interleaving" />
2
3# Random Interleaving
4
5[Random Interleaving](https://github.com/google/benchmark/issues/1051) is a
6technique to lower run-to-run variance. It randomly interleaves repetitions of a
7microbenchmark with repetitions from other microbenchmarks in the same benchmark
8test. Data shows it is able to lower run-to-run variance by
9[40%](https://github.com/google/benchmark/issues/1051) on average.
10
11To use, you mainly need to set `--benchmark_enable_random_interleaving=true`,
12and optionally specify non-zero repetition count `--benchmark_repetitions=9`
13and optionally decrease the per-repetition time `--benchmark_min_time=0.1`.
14