GNOME Bugzilla – Bug 619418
Add a performance test for UTF-8 decoding functions
Last modified: 2011-06-04 05:50:33 UTC
Moving out from bug #614856, the patches that add performance measurements for UTF-8 decoding to the test suite.
Created attachment 161769 [details] [review]
Added a performance test for UTF-8 decoding functions
Created attachment 161770 [details] [review]
Added perf tests for UTF-8 string conversion functions with size specified
Created attachment 161771 [details] [review]
Added a performance test for a loop of g_utf8_prev_char/g_utf8_get_char
1. Use straight UTF-8, no hex/octal escaping.
2. Not sure if the test suite is the right place for performance tests. It will just slow down the test suite.
Also, please attach as one patch.
(In reply to comment #4)
> 1. Use straight UTF-8, no hex/octal escaping.
I didn't know it's OK to use UTF-8 verbatim in Glib source. Will do.
> 2. Not sure if the test suite is the right place for performance tests. It
> will just slow down the test suite.
The test suite has other performance tests, and they don't really run unless the perf mode is specified.
Good to know. Please prepare a single revised patch then.
Created attachment 162865 [details] [review]
All-in-one patch, with review comments addressed
The following fix has been pushed:
1b101a3 Added performance tests for UTF-8 decoding functions
Created attachment 189196 [details] [review]
Added performance tests for UTF-8 decoding functions
I noticed that all of the strings tested come from the Unicode BMP. Would You mind adding test strings from other 'multilingual planes' too? For example for the SMP I'd suggest:
/* First line from a phoenician funeral inscription (KAI 1) ;-) */
static const char str_phoenician = "
Ok, seems there is a bug in bugzilla :-(.
The proposed phoenician string as encoded with base64:
(You may, of course, just test any random characters out of the SMP ;)