[Cairo] Use __builtin_popcount when available

Carl Worth cworth at east.isi.edu
Thu Jul 31 17:16:08 PDT 2003


On Jul 31, Richard Henderson wrote:
 > 	* iccolor.c (Ones): Define as __builtin_popcount when
 >        available.

Seems fine to me. I'm all for Cairo going faster, (it's not been
optimized at all yet).

A note to anybody considering digging through and optimizing things:
We plan on throwing away the current trapezoid rasterization
algorithm, (all of ictrap.c), as we found a bug in its
specification. We've got a new algorithm planned and prototyped in
nickle -- just need to whip out a C version.

So please don't waste time with the current ictrap.c.

And while I'm on the topic, when stroking splines, the tessellation
into trapezoids is currently O(n^2), but I think it can be done in
O(n). If anyone is interested in helping to fix that, just let me
know.

Other fun processor-specific improvements could be made to the
compositing code to take advantage of the extended instruction set of
current processors. I know that Billy Biggs is currently looking into
that problem.

Oh, and more of the RENDER extension could be accelerated within the X
drivers...

And we might want an OpenGL backend...

Lots of fun to be had in the make-it-fast realm. Just be sure to
profile first, and be sure we're not about to change the
implementation either. ;-)

-Carl




More information about the cairo mailing list