[cairo] Cairo 1.3 performance loss

Jorn Baayen jorn at openedhand.com
Thu Feb 1 03:10:25 PST 2007


Hi,

On Thu, 2007-02-01 at 11:51 +0100, David Turner wrote:
> > This still times individual iterations (but runs X of them and takes the
> > median). The problem is that on this machine gettimeofday()'s
> > granularity is too coarse to register any difference in time for many of
> > the tests.
> > 
> 
> Sorry for the confusion, here's a patch that adds a '-m' flag to cairo-perf
> that can be used to specify test case multipliers. You can also define
> the CAIRO_PERF_MULTIPLIER environment variable.

Unfortunately this doesn't help. Every test case does this:

cairo_perf_start ();
do_something ();
cairo_perf_stop ();
return cairo_perf_elapsed ();

Now on ARM _start() and _stop() record the time using gettimeofday(),
and _elapsed() takes the difference. But many tests run so quickly that
they are done in less than a centisecond, which is all the timer 
granularity there is here. This means the times get returned as 0, and
adding together many zeroes doesn't help. 

To add a 'time many iterations in one go' mode, a timer would need to be
added around the whole iterator, and that's perhaps not very elegant
as we also have timing code inside the tests themselves ..

Sorry for the confusion!

Thanks,

Jorn

> 
> Hope this helps,
> 
> - David
-- 
OpenedHand Ltd.
http://o-hand.com/



More information about the cairo mailing list