#include <benchmark/benchmark.h>
static void BM_SomeFunction(benchmark::State& state) {
// Perform setup here
for (auto _ : state) {
// This code gets timed
SomeFunction();
}
}
// Register the function as a benchmark
BENCHMARK(BM_SomeFunction);
// Run the benchmark
BENCHMARK_MAIN();
Benchmark Time(ns) CPU(ns) Iterations
----------------------------------------------------------------------
BM_SetInsert/1024/1 28928 29349 23853 133.097kB/s 33.2742k items/s
BM_SetInsert/1024/8 32065 32913 21375 949.487kB/s 237.372k items/s
BM_SetInsert/1024/10 33157 33648 21431 1.13369MB/s 290.225k items/s
I was experimenting with https://github.com/google/jax (for automatic differentiation)
maybe not discovered, but still trying to use gdb for real, it is not too easy to handle
Curiously "/usr/bin/env make -f" works ok on the command line. No quotes.
there seems to be an answer https://unix.stackexchange.com/questions/399690/multiple-arguments-in-shebang
#!/usr/bin/env -S command arg1 arg2 ...