Message195240
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. |
|
Date |
User |
Action |
Args |
2013-08-15 09:22:11 | vstinner | set | recipients:
+ vstinner, lemburg, rhettinger, pitrou, christian.heimes, eric.snow, serhiy.storchaka |
2013-08-15 09:22:11 | vstinner | set | messageid: <1376558531.72.0.562797703026.issue17628@psf.upfronthosting.co.za> |
2013-08-15 09:22:11 | vstinner | link | issue17628 messages |
2013-08-15 09:22:11 | vstinner | create | |
|