[cairo] Operator optimization based on source or dest opacity

Carl Worth cworth at cworth.org
Wed Feb 27 15:21:26 PST 2008


On 27 Feb 2008 23:30:53 +0100, Soeren Sandmann wrote:
> I could be wrong, but it looks to me like the problem is still there.
> >From cairo-perf.c, line 184:
>
>         for (i =0; i < perf->iterations; i++) {
>         ....
>             } else if (! perf->exact_iterations) {
>                 if (i > 0) {
>                     _cairo_stats_compute (&stats, times, i+1);
...
>                 }
>             }
>
> Ie,. the statistics are computed on each iteration if perf->raw and
> perf->exact_iterations are both FALSE, which is the case by default.

Ah, OK.

When I looked at the code I was thinking of the bug report as being "I
cranked the number of iterations way up but things never got more
stable" so when I saw (! perf->exact_iterations) condition above I
decided there was no bug.

The whole idea of computing incremental statistics was simply to get
the performance test suite to run very quickly, (by bailing as soon as
thing looked stable). If that's fundamentally flawed since the
statistics computation interferes with the results too much, then maybe
the right fix is to simply remove all of that code, (which will
simplify things a bunch), and just run a small, fixed number of
iterations by default.

And that explains why I haven't ever noticed any stability problems
personally. I never look at the absolute results from a single run of
the test suite. They are not interesting alone, (you need something to
compare them to before they are interesting). So I only ever run
things such as:

	cairo-perf-diff HEAD

to examine the performance impact of my most recent commit.
Or things like:

	cairo-perf-diff master experimental-branch
	cairo-perf-diff 1.4.8 master
	cairo-perf-diff 1.5.0 1.5.10

to examine the performance differences between different versions of
cairo.

And all of these usages of cairo-perf-diff end up running cairo-perf
with "-r -i 10" which sets exact_iterations so the incremental
statistics don't get computed.

So that's really what I would recommend people running anyway. But
sure, let's fix the defaults for cairo-perf to give sane numbers as
well.

-Carl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.cairographics.org/archives/cairo/attachments/20080227/af54d537/attachment.pgp 


More information about the cairo mailing list