question on timing results

Globe Trotter itsme_410 at yahoo.com
Wed Jun 8 13:40:34 UTC 2005


Hi,

This is strictly not an FC question, but I would like to time two (mine and the
naive) competing algorithms. My question is how do I do it accounting for CPU
utilization. Unless I misunderstood the documentation, clock() provides the
processor time and so the difference between clock() at the beginning of the
call to an algorithm and the end would provide me with the CPU time elapsed.
However, if for some reason the processor was running at 75% or whatever, my
reported time would be affected, and hence there would not really be a fair
comparison. Does anyone have any ideas/suggestions as to how I may settle this
issue?

Many thanks and best wishes!


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 




More information about the fedora-list mailing list