You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A common pattern I am using in my benchmarking code is:
for (auto _ : state) {
state.PauseTiming();
/* Generate some data for this iteration, or cleanup from the previous */
state.ResumeTiming();
/* Do some work */
}
This seems a little unpleasant because timing is starting when entering the loop body and immediately being paused.
What I would like instead is something like:
for (auto _ : state.with_paused_timing()) {
/* Generate some data for this iteration, or cleanup from the previous */
state.ResumeTiming();
/* Do some work */
}
The text was updated successfully, but these errors were encountered:
A common pattern I am using in my benchmarking code is:
This seems a little unpleasant because timing is starting when entering the loop body and immediately being paused.
What I would like instead is something like:
The text was updated successfully, but these errors were encountered: