timing a program

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!
You could use a profiler to profile your code.
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.