[cairo-bugs] [Bug 24143] A suggestion on Performance optimization in cairo-pdf-operators.c.
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Tue Sep 29 00:18:01 PDT 2009
http://bugs.freedesktop.org/show_bug.cgi?id=24143
Lance <lliu at microstrategy.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
--- Comment #5 from Lance <lliu at microstrategy.com> 2009-09-29 00:17:59 PST ---
(In reply to comment #4)
> Created an attachment (id=29919)
--> (http://bugs.freedesktop.org/attachment.cgi?id=29919) [details]
> Provide a builtin implementation of isspace and isdigit
> Try the following patch and let me know if it improves the performance.
Thank you for the patch. It improves the performance. Here's the related part
of profiling result.
# Count % Time
1 static int
2 _count_word_up_to (const unsigned char
*s, int length)
3 74,980 0.0 15,180.9 {
4 74,980 0.0 15,711.4 int word = 0;
5
6 259,305 0.1 51,434.9 while (length--) {
7 259,305 0.1 55,511.2 if (! (_cairo_isspace (*s) || *s
== '<')) {
8 184,325 0.1 38,146.3 s++;
9 184,325 0.1 39,336.9 word++;
10 } else {
11 74,980 0.0 14,809.0 return word;
12 }
13 }
14
15 return word;
16 }
It is nice to see that Line 6 and Line 7 take similar amount of time now.
--
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
More information about the cairo-bugs
mailing list