I would like to do some benchmarking on a few simple functions in C.
// Record start time
// Do a bunch of work
for (int i = 0; i < SOME_BIG_NUMBER; i++)
mySimpleFunction();
// Record stop time
In my release build configuration the compiler is smart enough to optimize this away.
Is there a canonical method of working with release configurations where you want optimizations enabled but still would like to force specific code to be executed?
Thanks!
Use the result: