[PATCH 03/14] miwideline: Factor out span buffer allocation.

Jamey Sharp jamey at minilop.net
Wed May 12 12:16:08 PDT 2010


On Mon, May 10, 2010 at 8:13 AM, Adam Jackson <ajax at nwnk.net> wrote:
> On Sat, 2010-05-08 at 16:39 -0700, Jamey Sharp wrote:
>> Signed-off-by: Jamey Sharp <jamey at minilop.net>
>
> I suspect that, at one point in time, this may have been manually
> inlined for performance.  Not that I care, just that it's likely.  Might
> be good to compare runs of x11perf -wline{10,100,500}.

Any differences with and without this patch are lost in the level of
noise I'm getting in my x11perf runs. It looks like the patch is
somewhere between 2% slower and 2% faster on those three tests. Is
that even useful to note in the commit message? I tested before and
after the patch, and also with the InitSpans function declared inline,
and all three versions have nearly identical performance. On modern
CPUs they certainly ought to be about the same, or a little faster
overall due to better code density in cache.

I'd guess the bigger reason there was so much duplication was that
different cases were using different allocators before. I assume the
spanData case has always needed to malloc, but the !spanData case was
using alloca?

I'd also guess we could get a performance win by merging the
allocations for points and widths, but it's mi span rendering, so who
cares? :-)

Can I get your reviewed-by, or is there some issue left?

Jamey


More information about the xorg-devel mailing list