[benchmark-set] Pause timing around set copy initialization
This commit is contained in:
parent
ce5435a862
commit
0fe1869228
|
@ -33,7 +33,9 @@ static void BM_SetInsert_1000(benchmark::State& state) {
|
||||||
assert(hb_set_get_population(original) == set_size);
|
assert(hb_set_get_population(original) == set_size);
|
||||||
|
|
||||||
for (auto _ : state) {
|
for (auto _ : state) {
|
||||||
|
state.PauseTiming ();
|
||||||
hb_set_t* data = hb_set_copy(original);
|
hb_set_t* data = hb_set_copy(original);
|
||||||
|
state.ResumeTiming ();
|
||||||
for (int i = 0; i < 1000; i++) {
|
for (int i = 0; i < 1000; i++) {
|
||||||
hb_set_add(data, i * 2654435761u % max_value);
|
hb_set_add(data, i * 2654435761u % max_value);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue