Marc-Andre Lemburg added the comment: You should be able to squeeze out some extra cycles by avoiding the bit calculations using a simple range check for ch >= 0xd800:
+# if STRINGLIB_MAX_CHAR >= 0xd800 + if (((ch1 ^ 0xd800) & + (ch1 ^ 0xd800) & + (ch1 ^ 0xd800) & + (ch1 ^ 0xd800) & 0xf800) == 0) + break; +# endif ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue12892> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com