c++ - Is there the right way of function benchmarking? -
this question has reply here:
how calculate execution time of code snippet in c++ 11 answersi'd ask, method of measuring time required function execute considered best? curious. thanks.
you can seek utilize rdtsc(); it's accurate, perhaps fastest , cross-platform (but x86 architecture). example, in windows:
#include <intrin.h> uint64_t rdtsc() { homecoming __rdtsc(); }
c++ benchmarking
No comments:
Post a Comment