This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients christian.heimes, eric.snow, lemburg, pitrou, rhettinger, serhiy.storchaka, vstinner
Date 2013-08-15.09:22:11
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1376558531.72.0.562797703026.issue17628@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2013-08-15 09:22:11vstinnersetrecipients: + vstinner, lemburg, rhettinger, pitrou, christian.heimes, eric.snow, serhiy.storchaka
2013-08-15 09:22:11vstinnersetmessageid: <1376558531.72.0.562797703026.issue17628@psf.upfronthosting.co.za>
2013-08-15 09:22:11vstinnerlinkissue17628 messages
2013-08-15 09:22:11vstinnercreate