[cairo] Re: [RFC] altivec optimization

Carl Worth cworth at cworth.org
Wed Jan 24 11:56:54 PST 2007

On Wed, 24 Jan 2007 20:03:00 +0100, Luca Barbato wrote:
> Ross Burton wrote:
> > Wouldn't it be a good idea to use liboil for this sort of optimisations?
> > It has some pixel operations already and I'm sure if the operations
> > Cairo requires are not present, they can be added:
> >
> > http://liboil.freedesktop.org/documentation/liboil-liboilfuncs-pixel.html
> In short? No.

That's way too short an answer for me to take you very seriously.

The liboil approach is very interesting in that it has a good
framework for providing alternate implementations of the same
functionality, and it has tests to ensure that all the implementations
match the behavior of the reference version. And very significantly,
liboil measures and selects the fastest of the several implementations
at run-time.

That dynamic selection is very interesting, since it can be quite a
difficult to manually select between various functions and be assured
that one ends up with the optimal choice, (just take a look through
pixman's nightmare of switch statements to see where that road can end

Now, I would still like to see liboil improved so that the entire
overhead of measurement isn't taken at startup time by every
liboil-using application. It seems that there's an opportunity to
benefit from a good cache here somewhere.

But I definitely see a lot of potential that liboil has for helping
out a library like cairo. And particularly so as David has already
done the work to implement some of the functionality that cairo
actually wants inside the liboil framework. So I've been waiting for
someone to try picking this work up and seeing what it could do for

What exactly did you mean by your very curt "no"?

-------------- 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/20070124/bf694d3b/attachment.pgp

More information about the cairo mailing list