STINNER Victor added the comment: In issue #18719, Raymond modified Python 2.7, but he didn't touch the following macro:
#define Py_UNICODE_MATCH(string, offset, substring) \ ((*((string)->str + (offset)) == *((substring)->str)) && \ ((*((string)->str + (offset) + (substring)->length-1) == *((substring)->str + (substring)->length-1))) && \ !memcmp((string)->str + (offset), (substring)->str, (substring)->length*sizeof(Py_UNICODE))) It was said that looking for the last character before calling memcmp() is inefficient for the CPU cache. This macro should also be modified. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue17628> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com