[issue37348] add _PyUnicode_FROM_ASCII macro

Inada Naoki report at bugs.python.org
Thu Jun 20 08:27:06 EDT 2019


Inada Naoki <songofacandy at gmail.com> added the comment:

I confirmed at least one measurable speedup:

./python -m pyperf timeit -s 'd={}' -- 'repr(d)'

FromString: Mean +- std dev: 157 ns +- 3 ns
FROM_ASCII: Mean +- std dev: 132 ns +- 3 ns

>>> (157-132)/157
0.1592356687898089

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37348>
_______________________________________


More information about the Python-bugs-list mailing list