[try Beta version]
Not logged in

 
timing a program

Mar 12, 2013 at 7:35pm
Hi! I have a code and I amn considering 3 implementations for a particular piece of it. I need to measure which implementation is the best in terms of performance.
What is the best way to do that? I would like the result to be as meaningfull as possible, and if I just measure the time the program runs, maybe the result would be influenced by whether my computer is getting hot or not, whether some unrelated programs are running or not...

Is there a checklist or a protocol or soemthing to make such tests as good as posssible?
thanks!
Mar 12, 2013 at 10:51pm
You could use a profiler to profile your code.
Mar 12, 2013 at 10:57pm
May be you'll find some interesting articles when search cplusplus.com for "time measurement"?

I described a method at http://www.cplusplus.com/forum/general/95269/
Topic archived. No new replies allowed.