Reputation: 873
I'm new to visual studio 2012 and I want to check the speed of my functions. What is the best way to do it? I am trying to speed up my function and I want to see the time it takes from the execution till it produces results. I appreciate the help.
Upvotes: 2
Views: 3054
Reputation: 7960
In addition to using QueryPerformanceCounter
mentioned in the other posts, there a few steps that will help you measure time more accurately:
Upvotes: 1
Reputation: 2988
There is likely no good way. Depending on the version of Visual Studio you have, it may come with profiler support, if so, enable that and it will tell you.
Else, look at something like the high-performance counter API at: http://msdn.microsoft.com/en-us/library/windows/desktop/ms644904%28v=vs.85%29.aspx
Upvotes: 1