[issue14654] More fast utf-8 decoding

Antoine Pitrou report at bugs.python.org
Mon Apr 23 23:23:13 CEST 2012


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

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

                                          vanilla 3.3   patched
utf-8     'A'*10000                       6668 (+7%)	7145
utf-8         'A'*9999+'\x80'             2358 (+3%)	2418
utf-8         'A'*9999+'\u0100'           2306 (+0%)	2311
utf-8         'A'*9999+'\u8000'           2299 (+0%)	2309
utf-8         'A'*9999+'\U00010000'       2373 (-4%)	2278
utf-8     '\x80'*10000                    366 (+53%)	559
utf-8       '\x80'+'A'*9999               859 (+1%)	868
utf-8         '\x80'*9999+'\u0100'        529 (+5%)	558
utf-8         '\x80'*9999+'\u8000'        529 (+5%)	558
utf-8         '\x80'*9999+'\U00010000'    529 (+5%)	558
utf-8     '\u0100'*10000                  520 (+6%)	549
utf-8       '\u0100'+'A'*9999             822 (+0%)	823
utf-8       '\u0100'+'\x80'*9999          519 (+6%)	549
utf-8         '\u0100'*9999+'\u8000'      520 (+6%)	549
utf-8         '\u0100'*9999+'\U00010000'  520 (+6%)	549
utf-8     '\u8000'*10000                  470 (+4%)	491
utf-8       '\u8000'+'A'*9999             822 (+0%)	822
utf-8       '\u8000'+'\x80'*9999          509 (+8%)	549
utf-8       '\u8000'+'\u0100'*9999        509 (+8%)	549
utf-8         '\u8000'*9999+'\U00010000'  470 (-4%)	451
utf-8     '\U00010000'*10000              483 (-6%)	453
utf-8       '\U00010000'+'A'*9999         938 (-1%)	926
utf-8       '\U00010000'+'\x80'*9999      561 (+6%)	595
utf-8       '\U00010000'+'\u0100'*9999    561 (+6%)	595
utf-8       '\U00010000'+'\u8000'*9999    503 (-4%)	482

----------

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


More information about the Python-bugs-list mailing list