[cairo-bugs] [Bug 24143] A suggestion on Performance optimization in cairo-pdf-operators.c.

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Sun Sep 27 11:20:38 PDT 2009


http://bugs.freedesktop.org/show_bug.cgi?id=24143





--- Comment #2 from James Cloos <cloos at jhcloos.com>  2009-09-27 11:20:35 PST ---
All of the ctype.h functions in glibc are slow in UTF-8 locales, so
alternatives would be useful.

Fontconfig maintains a good list of the whitespace characters in
the UCS; it would not be inappropriate to base an utf-8-aware
isspace(3) on that code.

Anything which only cares about POSIX- or C-locale spaces — aka ASCII
whitespace — could use a function which tests only for /[ \f\n\r\t\v]+/.

Cairo’s use of isdigit(3) probably only cares about ASCII digits; a
simple function which only tests against /[0-9]+/ would do for that.

In both cases, character encoding conversion must be avoided if one
wishes to optimize performance.


-- 
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