[issue16311] Use _PyUnicodeWriter API in text decoders

STINNER Victor report at bugs.python.org
Wed Oct 31 16:30:41 CET 2012


STINNER Victor added the comment:

I ran decodebench.py and bench-diff.py scripts from #14624, I just
replaced repeat=10 with repeat=100 to get more reliable numbers. I
only see some performance regressions between -5% and -1%, but there
are some speedup on UTF-8 and UTF-32 (between +11% and +14%). On a
microbenchmark, numbers in the -10..10% range just means "no change".

Using _PyUnicodeWriter should not change anything to performances on
valid data, only performances of handling decoding errors between the
overallocation factor is different, the code to widen the buffer and
the code to write replacement characters.

----------

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


More information about the Python-bugs-list mailing list