Is there a way to measure performance of your code apart from runtime?

Viewed 114

If I make some changes to my code in the hopes that it will improve performance, what's the best way to tell? Just running my code again I often find that Yes, it improved speed from 20.0 seconds to 19.5 seconds, but then I run it again and whops, 20.1 seconds. Is there something like a "total number of operations" or something that will be completely deterministic between runs that you can use to measure performance? I am coding C++ in Visual Studio

0 Answers
Related