[cairo] Added mmx fast path for fbComposeCopyAreammx

Soeren Sandmann sandmann at daimi.au.dk
Mon Mar 10 15:12:42 PDT 2008


Vladimir Vukicevic <vladimir at pobox.com> writes:

> On Mar 10, 2008, at 12:21 PM, Frederic Plourde wrote:
> >
> > Here's a speedup chart that supports this optimization :
> > http://pastebin.mozilla.org/362713
> > A mean perf gain of 1.5X was observed for the image-rgb cases  
> > instead of 0.99 as
> > seen before this optim.
> 
> There's something weird here, everything shows a speedup except:
> 
> before patch:
> image-rgb subimage_copy-512    0.303ms  (nommx) -> 0.321ms (mmx)  --  
> 94% speed
> 
> after patch:
> image-rgb subimage_copy-512    0.302ms  (nommx) -> 0.347ms (mmx)  --  
> 87% speed

Notice that number of iterations is 7. That is just not going to give
meaningful numbers.

Here is what I have been doing for testing pixman performance:

(1) Apply this patch:

        http://www.daimi.au.dk/~sandmann/stats2.patch

    This stops cairo from computing statistics in between
    iterations.

(2) Run something like 

        env CAIRO_TEST_TARGET=image cairo-perf -i 100000 subimage_copy > before.perf

(3) Apply pixman changes, and run make install.

(4) Then run

        env CAIRO_TEST_TARGET=image cairo-perf -i 100000 subimage_copy > after.perf

(5) Then do this

        cairo-perf-diff before.perf after.perf

For me, with this procedure, this patch makes no significant
difference. I did verify that it does get hit.

This is not too surprising though, as without the patch we just
hitmemcpy(). In both cases, we are likely to simply be memory
bandwidth limited.


Soren


More information about the cairo mailing list