[cairo] Compositing benchmarks

Jeff Muizelaar jeff at infidigm.net
Sat Mar 3 21:50:20 PST 2007


In my investigation into 'fixing' libpixman cairo's software compositing
code, I built a benchmarking suite for different software and hardware
compositing libraries.

In theory, it supports the following backend:
- cairo
- pixman (directly)
- cairo-glitz
- cairo-xlib
- glitz
- liboil
- evas_core (compositing routines from enlightenment)
- intel performance primitives

The x and glitz backends might be a little suspect, as I wasn't
completely sure what I was doing.

Here are some results:
The benchmark is compositing solid square images of exponentially
increasing size 100 times in a row. The color of the images are src color
(0xa4045090), dest color (0xe0e01000) (some backends optimize for alpha
of 255 or 0). The benchmarks were performed on a Intel(R) Xeon(TM) CPU
2.80GHz.

The most interesting:
argb32 OVER argb32
(./test -b oil,pixman,cairo,ipp,evas_core -o OVER --no-mask -s 33 -f ARGB32)
 - http://people.freedesktop.org/~jrmuizel/composite-bench/over-comparison-linear.png
 - liboil is the clear winner here. It looks like liboil is memory bound
   because there is a sharp drop off where the image's would no longer
   fit in cache. Even when we are out of cache liboil is about 4x faster
   than cairo. However, the liboil backend that was measured took
   advantage of the fact that it could treat the images as a single
   contiguous row in memory.

 - http://people.freedesktop.org/~jrmuizel/composite-bench/over-no-oil-cheat-comparison.png
 - This shows the same data as above, except the 'cheat' in liboil has
   been disabled. It looks pretty much how one would expect. The
   zig-zags are likely due to cache-size/image-size interactions.

argb32 ADD argb32
(./test -b oil,pixman,cairo,ipp,evas_core -o ADD --no-mask -s 33 -f ARGB32)
 - http://people.freedesktop.org/~jrmuizel/composite-bench/add-comparison-linear.png
 - liboil doesn't do nearly as well here. pixman matches it pretty
   closely. ipp takes a small lead as the image sizes get large.
   

I have put up a preview version of the source code at:
http://people.freedesktop.org/~jrmuizel/composite-bench/composite-bench-preview.tar.bz2
It isn't very clean, or usable so don't expect much.

In addition, there is a mostly self contained x86 binary at:
http://people.freedesktop.org/~jrmuizel/composite-bench/comp-bench.tar.bz2
This should make it easier for people wanting to try it out on different
machines. Note, this binary does not link to the ipp libraries because
of distribution issues.

Currently, the results are stored in a sqlite database and all of the
graphing/report generation is done using python and matlab (the binary
tarball does not contain the report generation source) I realize this is
less than ideal and I'll look into making it easier for people to
generate graphs without matlab. For now, it might be easiest if people
just made their results db (results/data.store) available, and I can
produce graphs on Monday.

-Jeff


More information about the cairo mailing list