[cairo] More info about fbCompositeCopyAreammx
sandmann at daimi.au.dk
Fri Mar 28 03:22:34 PDT 2008
Vladimir Vukicevic <vladimir at pobox.com> writes:
> On Mar 27, 2008, at 11:51 AM, Frédéric Plourde wrote:
> > Remember that issue you brought up about subimage_copy with 512X512
> > which made things slower ?
> > I've got some more news about it...
> > Since Soeren questionned the precision of giving perf results with
> > only a small number of iterations, I've used a minimum of 100
> > iterations on my perf tests.
> > Take a look at the newest results about "subimage_copy"...
> > http://pastebin.mozilla.org/383418
> > First group of results shows NO GAIN between pre-mmx and post-mmx
> > versions
> > except for the 512X512 case alone, which shows 58% speedup... that's
> > weird
> > The second group of results shows perf GAINS between : before
> > applying my patch and after applying my "fbCompositeCopyArea" patch
> > But these gains, as you noticed earlier, seem to fade out as the
> > image scales up.
> > I'll investigate some more about that, but for now, I think the
> > patch "pixman_OPT_MMX_addFastPath_to_fbCompositeCopyAreammx.patch"
> > is worth it.
> Sounds good to me -- Soeren, adding an x8r8g8b8 -> a8r8g8b8 SOURCE
> path being a Copy sounds sane, right?
Sure, it's correct enough (provided you mean a8r8g8b8->x8r8g8b8), but
it's just not going to make much of a performance difference.
For the subimage_copy tests, even 100 iterations is way too low, so I
tested with 100000 and cairo-perf-diff reports this:
image-rgb subimage_copy-256 0.01 2.00% -> 0.01 1.95%: 1.06x speedup
image-rgb subimage_copy-128 0.01 2.02% -> 0.01 1.98%: 1.05x speedup
image-rgb subimage_copy-16 0.01 1.91% -> 0.01 1.85%: 1.05x speedup
There is just nothing there.
This is not surprising either, because the operation is memory
bandwidth limited, so it does not matter whether you use memcpy() or
I'm not actively oppposed to the patch, but if you do add it, please
also use fbCopyAreammx in the ABGR->XBGR case as well.
More information about the cairo