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

Stefan Krah report at bugs.python.org
Sat Dec 10 15:16:46 CET 2011


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

> I prefer to not expose such function or someone will use it without
> understanding exactly how dangerous it is.

OK. - I'm afraid that I made an error in the benchmarks, since I
accidentally used a changed version of telco.py, namely:

    # t is a Decimal
    outfil.write("%s\n" % t) # original version
    ...

    outfil.write(str(t))     # changed version runs 
    outfil.write('\n')       # faster since PEP-393
    ...

Since PEP-393 the changed version with two calls to write()
runs quite a bit faster than the original. For Python-3.2
and 2.7 the original runs faster.

Do you have an idea what could cause this?

----------

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


More information about the Python-bugs-list mailing list