Best, Gnusci
"Never make a calculation until you know the answer." -- Wheeler, Spacetime Physics, pg 60.
I see that this thread is long dead, but for future googlers who come across it as I did in their search for an accurate way to compare execution times in C or C++, a very simple solution is provided by the cycle.h file included with the source code for FFTW, available at http://www.fftw.org. It can be included in any program (subject to FFTW's license) independently from the rest of FFTW, and implements a tick counter using inline assembly provided for many different architectures.
Bookmarks