[cairo] Pixman - refactoring of fbFetchTransformed - performance issue

Bertram Felgenhauer bertram.felgenhauer at googlemail.com
Sat Feb 16 01:16:14 PST 2008


Hi,

I've noticed today that cairo's performance testsuite only uses
untransformed sources in its tests. This means that - contrary to
my assumptions - it didn't measure any effects of the
fbFetchTransformed refactoring in pixman at all.

I'll attach a patch that adds a magnified and a minified image
source test to the suite.

The bad news is that the refactoring has a noticable performance
impact on a code path that is already slow:

image-rgb  paint_image_rgba_min_source-256    7.48 0.69% ->  10.04 0.10%:  1.34x slowdown
image-rgba paint_image_rgba_mag_source-256    7.01 0.81% ->   9.27 0.06%:  1.34x slowdown
[...]
image-rgb  paint-with-alpha_image_rgba_min_over-512   35.67 0.26% ->  45.13 0.13%:  1.27x slowdown
image-rgb  paint-with-alpha_image_rgba_min_over-256    9.01 0.20% ->  11.35 0.04%:  1.27x slowdown
[...]

(measured on an 1.8 GHz Athlon XP, using gcc 4.1.2,
CFLAGS=-O2 -fomit-frame-pointer -march=athlon-xp)

That's about 30%. Now the question is, is this acceptable for a
refactoring that significantly improves maintainability or not?

I'm leaning towards keeping the change.

Bertram


More information about the cairo mailing list