[cairo] Added mmx fast path for fbComposeCopyAreammx
frederic.plourde at polymtl.ca
Fri Mar 14 10:15:12 PDT 2008
Soeren Sandmann a écrit :
> 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 :
>>> 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:
> This stops cairo from computing statistics in between
> (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.
Thanks for the tip Soeren.
However, I've run 500 iterations on the image targets with subimage_copy
perf tests... got very decent STD levels, and still, I got significant
see the speedup chart : http://pastebin.mozilla.org/366980
(weird that we get different results... you're running it under linux,
right ? That could explain the difference.. I'll run it under linux as
well and compare.)
Plus I intend to take a closer look to larger-sized images where the
perf gains seem to drop ! (This might catch Vald's interest ;-)
get back to you later ;-)
More information about the cairo