[cairo] Analytical curve bounds

Kalle Vahlman kalle.vahlman at gmail.com
Mon Dec 29 12:30:37 PST 2008


2008/12/29 Behdad Esfahbod <behdad at behdad.org>:
> Kalle Vahlman wrote:
>
>> Attached is the output of 'cairo-perf-diff ef0f6c^ ef0f6c' (only the
>> image backend) on Acer Aspire One. There's loads of fill tests that
>> are faster, but also few noticeable slowdowns.
>
> Thanks Kalle.  Since all the results are in thee 20% difference range I wonder
> how much of it is noise.

Well, it's not a "empty room" run so sure, it could be just noise.

Did three more runs and of the slowdowns these seemed to be persitant,
while others flickered away:

image-rgba    paint_solid_rgba_source-256    0.06 31.39% ->   0.09
27.23%:  1.21x slowdown
▎
image-rgba      paint_solid_rgba_over-256    0.37 29.64% ->   0.54
26.54%:  1.20x slowdown
▎
image-rgb           composite-checker-64     0.07 15.54% ->   0.07
1.21%:  1.13x slowdown
▏
image-rgba  paint_similar_rgba_source-256    0.49 7.29% ->   0.52
5.17%:  1.12x slowdown

but to be sure I inserted a printf in the new function and indeed it's
just a fluke, the new code isn't called at all in any of those :)

>  In fact, I wonder how much of the tests actually hit
> the new code path at all.  I think we need a test that does a lot of
> cairo_fill_extents() in a loop to exercise the new code.  Even that I'm not
> sure.  Chris knows which goes through which path...

The fills seem legit though, since there's plenty of them in the
positive side and the new code does get called in them in abundance.
For example, during fill_solid_rgb_over-64 I counted (well, wc did ;)
405 calls to _cairo_spline_bound().

So looks like the new code should be a definitive win.

-- 
Kalle Vahlman, zuh at iki.fi
Powered by http://movial.fi
Interesting stuff at http://sandbox.movial.com
See also http://syslog.movial.fi


More information about the cairo mailing list