[issue13570] Expose faster unicode<->ascii functions in the C-API

Stefan Krah report at bugs.python.org
Mon Dec 12 00:36:35 CET 2011


Stefan Krah <stefan-usenet at bytereef.org> added the comment:

Sorry, the title of the issue isn't correct any more. The revised
issue is that in 3.3

a) outfil.write("%s\n" % t)

is about 11% slower than in Python2.7 and 8% slower than in Python3.2.


On the other hand in 3.3 the hack

b) outfil.write(str(t)); outfil.write('\n') 

runs about as fast as a) in 3.2.


This doesn't necessarily show up in microbenchmarks with timeit, so
I thought I'd leave this open for others to see (and comment).

But if I understand correctly, the slowdown in string formatting is
expected, so we can indeed close this.

----------
resolution:  -> invalid
stage:  -> committed/rejected
status: open -> closed

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


More information about the Python-bugs-list mailing list