Daniel P. Berrangé berrange@redhat.com writes:
The elapsed time is the same regardless of ncalls, so I'm thinking that the compiler as been clever and optimized bench_nothing() into literally nothing. If I modify it to
static void bench_nothing(void *arg UNUSED) { static int i = 0; i++; return; }
then things work, but of course we're not benchmarking "nothing" anymore.
Maybe simplest to just delete this part of the benchmark? I don't think it's that useful.
Regards, /Niels