Re: command.c: gm benchmark iterations and duration
"Nguyen Vu Hung" <[email protected]> Fri, 29 Aug 2008 12:33:23 +0900
| Newsgroups | gmane.comp.video.graphicsmagick.core |
|---|---|
| Message-ID | <[email protected]> |
2008/8/29 Bob Friesenhahn <[email protected]>: > Usage: utilities/gm benchmark options command ... > Where options include one of: > -duration duration duration to run the benchmark (in seconds) > -iterations loops number of iterations to execute > Note the line "Where options include one of". Sorry, I didn't notice that. > >> but I think sometimes average time is not enough, we need to know >> deviation of times to see how balance the elapsed time is. > > The problem with doing this is that the overhead of checking the timer > will alter the results, but more significantly, that the portable > timer resolution is often not very good. For example, Windows only > offers 20ms granularity. Many Unix systems offer 10ms, but some could > be as terrible as 100ms since the traditional Unix clock tick is > 100Hz. The "user time" measurement is often based on if the process > used CPU in one of those 100Hz scheduling intervals. The possibility > of poor timer resolution is a reason for running the benchmark for > tens of seconds rather than a few iterations or just a second. Nowadays, most modern CPUs do have much more faster clock. Even a quite old PC using Pentium IV 2.4GHz is 24 times faster then the CPU you have mentioned. We don't have to worry about CPUs in embedded systems as well. As far as I know, most recent PDAs have CPU faster clocks faster than 400MHz. There are two approaches to benchmark: 1. Benchmark a block of code( gm benchmark uses this ) 2. Benchmark a whole run of a application( for example "time gm convert in out) The first approach is good for those who uses GM as a native library, while the later is used by those who runs GM from command line, or from a script. -- Best Regards, Nguyen Hung Vu ( Nguyễn Vũ Hưng ) vuhung16plus{remove}@gmail.dot.com , YIM: vuhung16 , Skype: vuhung16dg Japan through an eye of a gaijin: http://www.flickr.com/photos/vuhung/tags/fav/ ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Graphicsmagick-core mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/graphicsmagick-core