[Cairo] Use __builtin_popcount when available

Soorya Kuloor skuloor at verano.com
Mon Aug 25 16:50:07 PDT 2003


Hi Carl,

In an old e-mail you mentioned:

On Thu, 2003-07-31 at 18:16, Carl Worth wrote:
> 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).
>  < snip ....... snip>
> 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.
> 

I am interested in helping out with this O(n^2) problem. I have close to
a week scheduled for speeding up Cairo, especially the higher layers
(i.e. above libic). Can you please give me hints about how to speed the
code up? I have gone through the code and have a pretty good idea of the
code and control flow. However, I am not very clear on the math. Please
let me know if you have any other things that can be speeded up.

Thanks,
-- Soorya





More information about the cairo mailing list