[issue27938] PyUnicode_AsEncodedString, PyUnicode_Decode: add fast-path for "us-ascii" encoding

Serhiy Storchaka report at bugs.python.org
Fri Sep 2 07:37:42 EDT 2016


Serhiy Storchaka added the comment:

See also get_standard_encoding() in Python/codecs.c. I suppose it is faster.

UTF-32 is rarely used as external encoding, but it is still used as internal encoding in some programming languages and libraries (e.g. wchar_t* in C and std::wstring in C++ on Linux). The codec itself is very fast. I would add fast path all utf encodings (except utf-7).

----------

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


More information about the Python-bugs-list mailing list