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
{{ message }}
This repository was archived by the owner on Jul 15, 2023. It is now read-only.
The virtual call to Benchmark.get_InnerIterationCount can be on the same order of magnitude as simple operations one might like to time. Since the recommended usage is
for(inti=0;i<Benchmark.InnerIterationCount;i++)// test code here
we are adding one virtual call's worth of overhead per inner iteration and all of this overhead gets timed.
Ideally the getter should be non-virtual. Marking BenchmarkIteratorImpl as final might also work in more recent builds as the getter should then devirtualize.
Alternatively, we should update the recommended usage to hoist the call out of the loop.