[cairo] [PATCH] Performance patch for bo intersections

Carl Worth cworth at cworth.org
Thu Dec 14 11:46:56 PST 2006

On Tue, 12 Dec 2006 18:00:22 +0000, Baz wrote:
> Ok, here's a tidied up patch. Unfortunately theres no way to add this
> as an attachment without gmail mangling it, nor can I add in the raw
> results of perf-diff without it switching modes; here's the top figures:
> xlib-rgba    paint_solid_rgba_source-256    0.48 5.60% ->   0.22 5.30%:  2.20x speedup
> xlib-rgba      paint_solid_rgba_over-256   13.75 5.36% ->   7.97 1.04%:  1.72x speedup

So I gave this patch a try to see how it does, (I did have an awful lot
of trouble with the patch not applying, (git and patch both complained
that the patch was corrupt).

So, my testing strategy was to commit the patch, then run:

	sudo nice -n -12 ./cairo-perf-diff HEAD

and when I first ran that (getting only the default 10 iterations), I
also saw "paint" at the top of the results at around a 2x speedup.

Since we have reason to doubt that, I reran just that one test with:

	sudo nice -n -12 ./cairo-perf-diff -f HEAD -- paint

which is of course very fast, and sure enough "paint" disappeared
completely from the top of the results. Next was fill at 1.45x. It
disappeared the same way. Then fill. And then text. Finally I got some
results that don't seem to disappear no matter how many times I run

image-rgb   zrusin_another_tessellate-415    8.07 0.49% ->   7.79 0.80%:  1.16x speedup
image-rgba  zrusin_another_tessellate-415    8.05 0.56% ->   7.77 0.79%:  1.16x speedup
 xlib-rgba  zrusin_another_tessellate-415    8.20 0.70% ->   7.94 3.15%:  1.15x speedup
 xlib-rgb   zrusin_another_tessellate-415    8.17 3.45% ->   7.97 7.59%:  1.15x speedup
image-rgba        fill_solid_rgb_over-64     0.22 1.33% ->   0.22 1.58%:  1.11x speedup
image-rgb         fill_solid_rgb_over-64     0.22 1.33% ->   0.23 0.84%:  1.11x speedup

Not nearly as impressive, but maybe those are at least real
numbers. Meanwhile, there are also slowdowns reported (though, just
for xlib, not image, so maybe those aren't real), from 1.05 to 1.10 in
the fill and text tests.

So I'm not seeing an obviously big advantage to the patch. The
slowdowns are almost as big as the speedups.

Please feel free to work at the patch and or the measurement more as
you'd like. I didn't do the patch splitting which would be a
prerequisite for landing it, (and will likely be useful for measuring
the two pieces separately anyway).

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/cairo/attachments/20061214/074e4043/attachment.pgp

More information about the cairo mailing list