Celero v2.0.5 Release Notes
Release Date: 2016-03-28 // about 8 years ago-
๐ This release re-adds the code to automatically compute some reasonable iteration count and sample size.
๐ The documentation was updated for this as well. In short, simply set your sample size to zero and Celero will attempt to do your job for you.
BENCHMARK(DemoSimple, Complex1, 0, 0) { celero::DoNotOptimizeAway(static\_cast\<float\>(sin(fmod(UniformDistribution(RandomDevice), 3.14159265)))); }
Will produce something like:
----------------------------------------------------------------------------------------------------------------------------------------------- Group | Experiment | Prob. Space | Samples | Iterations | Baseline | us/Iteration | Iterations/sec | ----------------------------------------------------------------------------------------------------------------------------------------------- DemoSimple | Complex1 | Null | 30 | 4194304 | 1.00535 | 0.20928 | 4778189.16 |
๐ You can see that the specification of
0
samples and0
iterations produced30
samples and4194304
iterations when it runs. This is based on making numerous measurements before actually running the experiment to determine reasonable values for these two numbers.