[issue14744] Use _PyUnicodeWriter API in str.format() internals

STINNER Victor report at bugs.python.org
Wed May 23 23:20:36 CEST 2012


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

Because I don't know what should be tested, I wrote a lot a tests in the bench_str.py script. To run the benchmark, use:

./python benchmark.py --file=FILE script bench_str.py

Then to compare results:

./python benchmark.py compare_to FILE1 FILE2 FILE3 ...

Download scripts from:
https://bitbucket.org/haypo/misc/src/tip/python/benchmark.py
https://bitbucket.org/haypo/misc/src/tip/python/bench_str.py

(I wrote the benchmark.py tool for this issue, it's a a generic tool to create and compare benchmarks.)

I attached results on 32 and 64 bits.

 * Python 2.7 vs 3.2 vs 3.3 (faster-format branch): REPORT_32BIT_2.7_3.2_writer and REPORT_64BIT_2.7_3.2_writer
 * Python 3.3, UCS4 buffer vs PyAccu vs _PyUnicodeWriter: REPORT_32BIT_3.3 and REPORT_64BIT_3.3

----------

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


More information about the Python-bugs-list mailing list