[issue14624] Faster utf-16 decoder

Antoine Pitrou report at bugs.python.org
Sun May 13 22:38:33 CEST 2012


Antoine Pitrou <pitrou at free.fr> added the comment:

New performance figures under 64 bit Linux, Intel Core i5-2500K @ 3.30GHz:

                                          vanilla 3.3   patched

utf-16le  'A'*10000                       1411 (+290%)	5504
utf-16le      'A'*9999+'\x80'             1368 (+263%)	4970
utf-16le      'A'*9999+'\u0100'           1145 (+151%)	2871
utf-16le      'A'*9999+'\u8000'           1144 (+151%)	2870
utf-16le      'A'*9999+'\U00010000'       1164 (+154%)	2957
utf-16le  '\x80'*10000                    1403 (+271%)	5209
utf-16le    '\x80'+'A'*9999               1406 (+272%)	5235
utf-16le      '\x80'*9999+'\u0100'        1138 (+138%)	2713
utf-16le      '\x80'*9999+'\u8000'        1138 (+139%)	2716
utf-16le      '\x80'*9999+'\U00010000'    1155 (+151%)	2897
utf-16le  '\u0100'*10000                  1477 (+243%)	5062
utf-16le    '\u0100'+'A'*9999             1478 (+243%)	5072
utf-16le    '\u0100'+'\x80'*9999          1477 (+243%)	5062
utf-16le      '\u0100'*9999+'\u8000'      1478 (+242%)	5055
utf-16le      '\u0100'*9999+'\U00010000'  1201 (+131%)	2776
utf-16le  '\u8000'*10000                  246 (+347%)	1100
utf-16le    '\u8000'+'A'*9999             1475 (+244%)	5069
utf-16le    '\u8000'+'\x80'*9999          1474 (+243%)	5062
utf-16le    '\u8000'+'\u0100'*9999        1473 (+243%)	5057
utf-16le      '\u8000'*9999+'\U00010000'  236 (+295%)	932
utf-16le  '\U00010000'*10000              393 (+164%)	1039
utf-16le    '\U00010000'+'A'*9999         1325 (+134%)	3106
utf-16le    '\U00010000'+'\x80'*9999      1326 (+134%)	3103
utf-16le    '\U00010000'+'\u0100'*9999    1326 (+134%)	3104
utf-16le    '\U00010000'+'\u8000'*9999    253 (+331%)	1091

utf-16be  'A'*10000                       1341 (+298%)	5342
utf-16be      'A'*9999+'\x80'             1305 (+275%)	4888
utf-16be      'A'*9999+'\u0100'           1101 (+157%)	2834
utf-16be      'A'*9999+'\u8000'           1102 (+157%)	2831
utf-16be      'A'*9999+'\U00010000'       1115 (+162%)	2917
utf-16be  '\x80'*10000                    1326 (+296%)	5253
utf-16be    '\x80'+'A'*9999               1322 (+298%)	5258
utf-16be      '\x80'*9999+'\u0100'        1088 (+156%)	2781
utf-16be      '\x80'*9999+'\u8000'        1088 (+155%)	2770
utf-16be      '\x80'*9999+'\U00010000'    1103 (+159%)	2854
utf-16be  '\u0100'*10000                  1344 (+221%)	4308
utf-16be    '\u0100'+'A'*9999             1342 (+223%)	4330
utf-16be    '\u0100'+'\x80'*9999          1343 (+221%)	4307
utf-16be      '\u0100'*9999+'\u8000'      1343 (+221%)	4306
utf-16be      '\u0100'*9999+'\U00010000'  1109 (+128%)	2529
utf-16be  '\u8000'*10000                  248 (+341%)	1094
utf-16be    '\u8000'+'A'*9999             1340 (+223%)	4331
utf-16be    '\u8000'+'\x80'*9999          1341 (+221%)	4307
utf-16be    '\u8000'+'\u0100'*9999        1341 (+221%)	4309
utf-16be      '\u8000'*9999+'\U00010000'  239 (+290%)	931
utf-16be  '\U00010000'*10000              399 (+160%)	1037
utf-16be    '\U00010000'+'A'*9999         1230 (+152%)	3101
utf-16be    '\U00010000'+'\x80'*9999      1218 (+154%)	3095
utf-16be    '\U00010000'+'\u0100'*9999    1220 (+154%)	3095
utf-16be    '\U00010000'+'\u8000'*9999    257 (+318%)	1074

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue14624>
_______________________________________


More information about the Python-bugs-list mailing list