After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 619418 - Add a performance test for UTF-8 decoding functions
Add a performance test for UTF-8 decoding functions
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: general
2.25.x
Other All
: Normal enhancement
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks: 614856
 
 
Reported: 2010-05-23 10:49 UTC by Mikhail Zabaluev
Modified: 2011-06-04 05:50 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Added a performance test for UTF-8 decoding functions (6.92 KB, patch)
2010-05-23 10:53 UTC, Mikhail Zabaluev
none Details | Review
Added perf tests for UTF-8 string conversion functions with size specified (3.12 KB, patch)
2010-05-23 10:53 UTC, Mikhail Zabaluev
none Details | Review
Added a performance test for a loop of g_utf8_prev_char/g_utf8_get_char (1.40 KB, patch)
2010-05-23 10:53 UTC, Mikhail Zabaluev
none Details | Review
All-in-one patch, with review comments addressed (6.61 KB, patch)
2010-06-06 13:43 UTC, Mikhail Zabaluev
committed Details | Review
Added performance tests for UTF-8 decoding functions (6.40 KB, patch)
2011-06-04 02:28 UTC, Matthias Clasen
committed Details | Review

Description Mikhail Zabaluev 2010-05-23 10:49:53 UTC
Moving out from bug #614856, the patches that add performance measurements for UTF-8 decoding to the test suite.
Comment 1 Mikhail Zabaluev 2010-05-23 10:53:46 UTC
Created attachment 161769 [details] [review]
Added a performance test for UTF-8 decoding functions
Comment 2 Mikhail Zabaluev 2010-05-23 10:53:49 UTC
Created attachment 161770 [details] [review]
Added perf tests for UTF-8 string conversion functions with size specified
Comment 3 Mikhail Zabaluev 2010-05-23 10:53:53 UTC
Created attachment 161771 [details] [review]
Added a performance test for a loop of g_utf8_prev_char/g_utf8_get_char
Comment 4 Behdad Esfahbod 2010-05-27 17:48:06 UTC
Please:

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.
Comment 5 Behdad Esfahbod 2010-05-27 17:48:38 UTC
Also, please attach as one patch.
Comment 6 Mikhail Zabaluev 2010-05-28 13:49:22 UTC
(In reply to comment #4)
> Please:
> 
> 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.
Comment 7 Behdad Esfahbod 2010-05-28 18:46:46 UTC
Good to know. Please prepare a single revised patch then.
Comment 8 Mikhail Zabaluev 2010-06-06 13:43:14 UTC
Created attachment 162865 [details] [review]
All-in-one patch, with review comments addressed
Comment 9 Matthias Clasen 2011-06-04 02:28:43 UTC
The following fix has been pushed:
1b101a3 Added performance tests for UTF-8 decoding functions
Comment 10 Matthias Clasen 2011-06-04 02:28:55 UTC
Created attachment 189196 [details] [review]
Added performance tests for UTF-8 decoding functions
Comment 11 Petr Tomasek 2011-06-04 05:47:59 UTC
Hi,

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[] = "
Comment 12 Petr Tomasek 2011-06-04 05:50:33 UTC
Ok, seems there is a bug in bugzilla :-(.

The proposed phoenician string as encoded with base64:

8JCkgPCQpJPwkKSN8JCkn/CQpIXwkKSQ8JCkj/CQpIvwkKSf8JCkgPCQpJXwkKSB8JCkj/CQpIvw
kKSf8JCkgfCQpI3wkKSA8JCkh/CQpJPwkKSM8JCkn/CQpIzwkKSL8JCkivCQpJ/wkKSC8JCkgfCQ
pIvwkKSf8JCki/CQpIDwkKSH8JCkk/CQpIzwkKSf8JCkgPCQpIHwkKSECg==

(You may, of course, just test any random characters out of the SMP ;)