[issue37348] add _PyUnicode_FROM_ASCII macro

Serhiy Storchaka report at bugs.python.org
Thu Jun 20 10:17:35 EDT 2019


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

Most of changes are in not performance sensitive code. I do not think there is a benefit of using new macro there.

If PyUnicode_FromString() is slow I prefer to optimize it instead of adding yet one esoteric private function for internal needs.

In case of dict.__repr__() we can get even more gain by using _Py_IDENTIFIER or more general API proposed by Victor.

----------
nosy: +serhiy.storchaka

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


More information about the Python-bugs-list mailing list