GNOME Bugzilla – Bug 619420
Optimize the overlong sequence check in g_utf8_get_char_extended()
Last modified: 2010-05-27 18:00:42 UTC
Moving out from bug #614856, this patch optimizes g_utf8_get_char_extended().
Performance tests from bug #619418 can be used to check the results.
Created attachment 161772 [details] [review]
Optimized the overlong sequence check in g_utf8_get_char_extended()
Rather make it branch to get the due sequence length for the resulting
character code, we can as well get the minimum code value in the initial
Also documented the cases when the function returns -1.
Committed after adding a couple more G_UNLIKELY()'s.