[issue13624] UTF-8 encoder performance regression in python3.3

STINNER Victor report at bugs.python.org
Sat Dec 17 22:19:16 CET 2011


STINNER Victor <victor.stinner at haypocalc.com> added the comment:

Python 3.2 (narrow):

ASCII: 10000 loops, best of 3: 28.2 usec per loop
UCS-1: 10000 loops, best of 3: 59.1 usec per loop
UCS-2: 10000 loops, best of 3: 88.8 usec per loop
UCS-4: 1000 loops, best of 3: 254 usec per loop

Python 3.2 (wide):

ASCII: 10000 loops, best of 3: 28.5 usec per loop
UCS-1: 10000 loops, best of 3: 60.8 usec per loop
UCS-2: 10000 loops, best of 3: 114 usec per loop
UCS-4: 10000 loops, best of 3: 129 usec per loop

Python 3.3 (specialized UTF-8 encoder):

ASCII: 100000 loops, best of 3: 2 usec per loop
UCS-1: 10000 loops, best of 3: 45.4 usec per loop
UCS-2: 10000 loops, best of 3: 96.4 usec per loop
UCS-4: 10000 loops, best of 3: 140 usec per loop

Attached patch adds UTF-8 encoder for UCS1, UCS2 and UCS4.

----------
keywords: +patch
Added file: http://bugs.python.org/file24005/utf8_encoder.patch

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


More information about the Python-bugs-list mailing list