Commit d2a86fd
Add a warmup phase to the InsertMiss_Cold benchmarks.
The first iteration of the `for (uint32_t key : keys)` loop is about 100 times slower than the following iterations. Thus, the benchmark needs a long time to reach a steady state.
By default, the benchmark framework runs each benchmark for around 0.5s. The first iteration of the loop seems to take around that much time. So sometimes, the benchmark framework runs just one iteration, and sometimes a significantly larger number of iterations (as the next iterations are much faster). This leads to a huge run-to-run variance.
This CL adds a warmup phase to the benchmark that excludes the first iterations from the timing measurements.
PiperOrigin-RevId: 744011324
Change-Id: I452a192ea5627eb5e9a9a078b7d123df1f443eaf1 parent 77d4a36 commit d2a86fd
1 file changed
+2
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
48 | 49 | | |
49 | 50 | | |
50 | | - | |
| 51 | + | |
51 | 52 | | |
52 | 53 | | |
53 | 54 | | |
| |||
0 commit comments