From 0fe18692286257df06f9af3fe8317edd4e7308dd Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Tue, 24 May 2022 17:49:15 -0600 Subject: [PATCH] [benchmark-set] Pause timing around set copy initialization --- perf/benchmark-set.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/perf/benchmark-set.cc b/perf/benchmark-set.cc index aa245541b..a9b428665 100644 --- a/perf/benchmark-set.cc +++ b/perf/benchmark-set.cc @@ -33,7 +33,9 @@ static void BM_SetInsert_1000(benchmark::State& state) { assert(hb_set_get_population(original) == set_size); for (auto _ : state) { + state.PauseTiming (); hb_set_t* data = hb_set_copy(original); + state.ResumeTiming (); for (int i = 0; i < 1000; i++) { hb_set_add(data, i * 2654435761u % max_value); }