[cairo] Cairo 1.3 performance loss
jorn at openedhand.com
Tue Feb 6 01:10:41 PST 2007
On Sat, 2007-02-03 at 00:53 -0500, Behdad Esfahbod wrote:
> On Thu, 2007-02-01 at 10:51 +0200, Jorn Baayen wrote:
> > Yeap. One idea would be to add a mode that times X iterations instead
> > of single ones, pretty much like my little tool above does.
> Basically what we want to make sure of is that the value we measure is
> of a few orders of magnitude more precision of that of the timer we use.
> That is, assuming something on the order of milliseconds, we want to
> measure values not smaller than a second. One way to do this is to time
> a constant number of iterations that is large enough to guarantee that
> it takes more than a second for a test.
> On the other hand, we don't want to spend too much time on a test. So
> for slower tests, we don't really want to run them as many times as the
> faster ones.
> And we don't want to run the tests too few times.
> These directly lead to a simple algorithm: while total time spent < X
> seconds or total number of runs < Y runs, do repeat the test.
This sounds good, but how would you normalize the recorded numbers?
Dividing by number of runs will in many cases throw us back to
> X and Y are configurable. 1 second and 10 runs are some arbitrarily
> sensible values.
> Last but not least, we are not only interested in the mean time, but
> also in how stable it is. That is, the standard deviation (for lack of
> a better measure). And unfortunately, if the test runs too fast, in the
> order of the precision of the timer, there's just no way to measure the
> standard deviation. Measuring the running time of multiple test runs
> seriously degrades the precision of the standard deviation we can
> compute, but I'm not sure there's much we can do about it.
> My 0.02 CADs
More information about the cairo