[issue14654] Faster utf-8 decoding

Antoine Pitrou report at bugs.python.org
Fri May 4 18:49:54 CEST 2012


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

64-bit Linux, Intel Core i5-2500K CPU @ 3.30GHz:

                                          vanilla 3.3   patch 2         patch 3

utf-8     'A'*10000                       6931 (+3%)	7115 (+0%)	7117
utf-8         'A'*9999+'\x80'             2347 (+1%)	2410 (-2%)	2360
utf-8         'A'*9999+'\u0100'           2279 (+1%)	2282 (+1%)	2310
utf-8         'A'*9999+'\u8000'           2264 (+2%)	2275 (+1%)	2300
utf-8         'A'*9999+'\U00010000'       2351 (+0%)	2283 (+3%)	2359
utf-8     '\x80'*10000                    516 (+8%)	558 (+0%)	559
utf-8       '\x80'+'A'*9999               859 (+0%)	868 (-1%)	860
utf-8         '\x80'*9999+'\u0100'        526 (+6%)	558 (+0%)	558
utf-8         '\x80'*9999+'\u8000'        535 (+4%)	558 (+0%)	558
utf-8         '\x80'*9999+'\U00010000'    525 (+6%)	559 (-0%)	558
utf-8     '\u0100'*10000                  517 (+6%)	548 (+0%)	548
utf-8       '\u0100'+'A'*9999             818 (+0%)	820 (+0%)	821
utf-8       '\u0100'+'\x80'*9999          517 (+6%)	548 (+0%)	548
utf-8         '\u0100'*9999+'\u8000'      525 (+4%)	548 (+0%)	548
utf-8         '\u0100'*9999+'\U00010000'  517 (+6%)	549 (+0%)	549
utf-8     '\u8000'*10000                  490 (-8%)	433 (+4%)	451
utf-8       '\u8000'+'A'*9999             818 (+0%)	819 (+0%)	821
utf-8       '\u8000'+'\x80'*9999          529 (+4%)	548 (+0%)	548
utf-8       '\u8000'+'\u0100'*9999        529 (+4%)	548 (+0%)	548
utf-8         '\u8000'*9999+'\U00010000'  470 (-4%)	451 (+0%)	451
utf-8     '\U00010000'*10000              554 (-18%)	427 (+6%)	453
utf-8       '\U00010000'+'A'*9999         938 (+0%)	927 (+2%)	941
utf-8       '\U00010000'+'\x80'*9999      572 (+4%)	595 (+0%)	595
utf-8       '\U00010000'+'\u0100'*9999    571 (+4%)	595 (+0%)	595
utf-8       '\U00010000'+'\u8000'*9999    503 (-4%)	481 (+0%)	482

----------

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


More information about the Python-bugs-list mailing list