[cairo] [Patch] Surface cache
Carl Worth
cworth at cworth.org
Mon Jan 29 12:05:24 PST 2007
On Mon, 29 Jan 2007 18:56:49 +0200, Jorn Baayen wrote:
> Attached patch adds a simple 16-entry static cache to
> _cairo_pattern_acquire_surface_for_solid(). It still needs work, however
Excellent! Thanks for providing this first step. What work is still
needed here? I know Behdad had expressed interest in doing this work,
so maybe he'll want to pickup your work and run with it.
> this already yields a speedup[2] of 12% when drawing text using GTK+
> 2.10, exceeding the performance of GTK+ 2.6. Yay!
I'm glad you're seeing a good performance benefit.
As a pet peeve though, I never like seeing performance comparisons
expressed with percentages. In fact, "speedup" is exactly the thing
I'd like to see reported. And I learned the calculation of speedup as:
speedup = old_slow_time / new_faster_time
So I'd much rather read "speedup of 1.12", (or perhaps even "1.12x
faster"), than "speedup of 12%". Maybe that's just me, though, but
reports with percentages always make we wonder if the reporter is
clear about the percentage is relative to.
> [2] Compare
> http://folks.o-hand.com/jorn/cairo-benchmarks/1.3.12-surface-cache/gtklabel/timewidgets.txt
> with
> http://folks.o-hand.com/jorn/cairo-benchmarks/1.3.12/gtklabel/timewidgets.txt
> and
> http://folks.o-hand.com/jorn/cairo-benchmarks/no-cairo/gtklabel/timewidgets.txt
That's an awful lot of text as URLs for what amounts to very little
text after all. :-)
Here's the content:
1.3.12-surface-cache:
Drawn widget 843 times. Average time spent drawing (in seconds): 0.003784
1.3.12:
Drawn widget 750 times. Average time spent drawing (in seconds): 0.003027
no-cairo:
Drawn widget 791 times. Average time spent drawing (in seconds): 0.001568
You indicated a speedup of 12% for the surface cache. I assume that's
from using number of widget draws. That is:
speedup = 843 / 750 = 1.124
As I already asked in another thread? Are these numbers stable enough
to be compared directly? It seems like the average drawing time should
do a better job of accounting for drift in the amount of time the
total test ran in each case.
But I'm really confused by the average times reported there. They show
the surface-cache case actually being slower, while the old no-cairo
case is about twice as fast. Can you explain what's going on there?
Perhaps what would help is just using cairo/perf test cases where I
trust the measurement infrastructure a lot more, (or at least I
understand it).
Thanks,
-Carl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/cairo/attachments/20070129/c11597c3/attachment.pgp
More information about the cairo
mailing list