[issue1302] Fixes for profile/cprofile
Christian Heimes
report at bugs.python.org
Mon Oct 22 03:17:03 CEST 2007
Christian Heimes added the comment:
Alexandre Vassalotti wrote:
> I don't think it's possible to add shortcuts in PyUnicode_Decode for
> UTF-16 and UTF-32 because the byte-order can be different depending of
> the platform. So, these two need to pass through the codecs module.
utf-16 and utf-32 are the the names for the native codecs. The explicit
names are e.g. utf-16-be or utf-32-le. The last argument 0 also means
"native byte order".
I used a shorter algorithm to optimize the normalization for the special
cases of the strcmp() shortcuts. Your version is fine but takes several
CPU cycles longer. I don't think it has a large performance impact. ;)
Christian
__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue1302>
__________________________________
More information about the Python-bugs-list
mailing list