[cairo] Alpha-blending performance: looking for bottlenecks in my code

Damian Frank damian.frank at gmail.com
Tue Mar 31 20:17:07 PDT 2009

On Wed, Mar 25, 2009 at 5:05 PM, Damian Frank <damian.frank at gmail.com> wrote:
> I'm trying to figure out why my code using Cairo is as slow as it is,
> and I could use some help.  Odds are, I'm falling off the fast path or
> something, but I can't see how.

In case anyone is interested, I figured out what the problem was here.
 We had recently started using MinGW and MSYS to build on Windows.
The current MinGW compiler is GCC 3, which (among other things, I
guess) doesn't work with SSE2 support in pixman.  Upgrading to the
MinGW GCC 4 alpha package improved performance by over 35 times for
this particular operation.

This really surprised me, because disabling SSE2 under our previous
(MSVC-based) setup only cut performance by about 50%.  I can't really
account for the rest of the 93% performance loss under MinGW/GCC 3.
However, I am happy to report that the GCC 4 build is in fact about 5%
faster than MSVC 6.  So, a happy ending.

Beware, MinGW users!


More information about the cairo mailing list