Facebook Open-source Library (Folly)
a library of C++14 components designed with practicality and efficiency in mind. - github
see also
Benchmark Tool
Benchmark timings are not a regular random variable that fluctuates around an average.
doNotOptimizeAway( yourvar)
- prevents compiler optimizations that may interfere with benchmarking
BENCHMARK(insertVectorBegin, iters)
The first is the name of the benchmark.
The second argument may be missing, or could be a symbolic counter. The counter dictates how many internal iteration the benchmark does.
BENCHMARK_COUNTERS(name, counters, ...)
Allow users to record customized counter during benchmarking, there will be one extra column showing in the output result for each counter
Like BENCHMARK_PARAM(), but allows a custom name to be specified for each parameter, rather than using the parameter value.
Useful when the parameter value is not a valid token for string pasting, of when you want to specify multiple parameter arguments.
BENCHMARK_SUSPEND
Allows execution of code that doesn’t count torward the benchmark’s time budget.
Installation
Not trivial to get dependancies rigth…
prefer to use Meson + CMake subproject + install FMT
FMT
Folly relies on fmt which needs to be installed from source.