Collation: ICU (4.8) vs GLIBC (2.13-1)
The performance test takes a locale and creates a RuleBasedCollator with
default options. A large list of names is used as data in each test, where the
names vary according to language. Each Collation operation over the whole list
is repeated 1000 times. The percentage values in the final column are the most
useful. They measure differences, where positive is better for ICU4C, and
negative is better for the compared implementation.
Key
Operation |
Units |
Description |
strcoll |
nanosecs |
Timing for string collation, an incremental compare of strings. |
keygen |
nanosecs |
Timing for generation of sort keys, used to 'precompile' information so
that subsequent operations can use binary comparison. |
keylen |
bytes/char |
The average length of the generated sort keys, in bytes per character
(Unicode/ISO 10646 code point). Generally this is the important field for sort
key performance, since it directly impacts the time necessary for binary
comparison, and the overhead of memory usage and retrieval time for sort
keys. |
Data
Locale |
Data file |
strcoll (ICU) |
keygen (ICU) |
keylen (ICU) |
strcoll (GLIBC) |
keygen (GLIBC) |
keylen (GLIBC) |
strcoll (GLIBC-ICU)/ICU) |
keygen (GLIBC-ICU)/ICU) |
keylen (GLIBC-ICU)/ICU) |
en_US | TestNames_Latin.txt | 48 | 551 | 1.470375 | 127 | 599 | 3.043689 | 164.583% | 8.71143% | 107.000% |
da_DK | TestNames_Latin.txt | 174 | 745 | 1.471414 | 132 | 620 | 3 | -24.137% | -16.778% | 103.885% |
de_DE | TestNames_Latin.txt | 49 | 560 | 1.470375 | 124 | 619 | 3 | 153.061% | 10.5357% | 104.029% |
fr_FR | TestNames_Latin.txt | 49 | 562 | 1.470375 | 126 | 600 | 3 | 157.142% | 6.76156% | 104.029% |
ja_JP | TestNames_Latin.txt | 48 | 564 | 1.470375 | 125 | 180 | 1.008595 | 160.416% | -68.085% | -31.405% |
ja_JP | TestNames_Japanese_h.txt | 170 | 471 | 3.066682 | 422 | 488 | 4.235949 | 148.235% | 3.60934% | 38.1280% |
ja_JP | TestNames_Japanese_k.txt | 178 | 501 | 3.066682 | 408 | 438 | 3.872655 | 129.213% | -12.574% | 26.2815% |
ja_JP | TestNames_Asian.txt | 198 | 385 | 3.116534 | 266 | 384 | 4.087169 | 34.3434% | -0.2597% | 31.1446% |
zh_CN | TestNames_Latin.txt | 184 | 849 | 1.473516 | 124 | 584 | 3.034630 | -32.608% | -31.213% | 105.944% |
zh_CN | TestNames_Chinese.txt | 153 | 209 | 3.324450 | 285 | 360 | 6.157595 | 86.2745% | 72.2488% | 85.2214% |
zh_CN | TestNames_Simplified_Chinese.txt | 156 | 220 | 3.324934 | 292 | 360 | 6.232670 | 87.1794% | 63.6363% | 87.4524% |
zh_TW | TestNames_Latin.txt | 183 | 823 | 1.473516 | 123 | 596 | 3.034630 | -32.786% | -27.582% | 105.944% |
zh_TW | TestNames_Chinese.txt | 153 | 210 | 3.323292 | 289 | 376 | 6.240170 | 88.8888% | 79.0476% | 87.7707% |
ko_KR | TestNames_Latin.txt | 50 | 551 | 1.470375 | 122 | 180 | 1.008453 | 144% | -67.332% | -31.415% |
ko_KR | TestNames_Korean.txt | 251 | 389 | 4.319956 | 240 | 162 | 3.325273 | -4.3824% | -58.354% | -23.025% |
ru_RU | TestNames_Latin.txt | 48 | 568 | 1.470375 | 123 | 593 | 3 | 156.25% | 4.40140% | 104.029% |
ru_RU | TestNames_Russian.txt | 173 | 1223 | 1.682716 | 212 | 1801 | 5 | 22.5433% | 47.2608% | 197.138% |
th_TH | TestNames_Latin.txt | 48 | 668 | 1.470375 | 123 | 541 | 3.764057 | 156.25% | -19.011% | 155.992% |
th_TH | TestNames_Thai.txt | 290 | 923 | 1.615096 | 386 | 1322 | 7.402520 | 33.1034% | 43.2286% | 358.333% |
Notes
- As with all performance measurements, the results will vary according to
the hardware and compiler. The strcoll operation is particularly sensitive; we
have found that even slight changes in code alignment can produce 10%
differences.
- For more information on incremental vs. sort key comparison, the importance
of multi-level sorting, and other features of collation, see Unicode Collation (UCA).
- For general information on ICU collation see User Guide.
- For information on APIs, see C,
C++, or Java.
|
|