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