amk wrote: > On Sun, Jun 18, 2000 at 09:06:45PM +0200, Fredrik Lundh wrote: > >so in other words, something in unicode land isn't > >as efficient as it should... >=20 > The relevant bit of findstring() in unicodeobject.c: >=20 > if (direction < 0) { > for (; end >=3D start; end--) > if (Py_UNICODE_MATCH(self, end, substring)) > return end; > } else { > for (; start <=3D end; start++) > if (Py_UNICODE_MATCH(self, start, substring)) > return start; > } >=20 > And... >=20 > #define Py_UNICODE_MATCH(string, offset, substring)\ > (!memcmp((string)->str + (offset), (substring)->str,\ > (substring)->length*sizeof(Py_UNICODE))) heh. it's my own code, of course... > Proposed patch: >=20 > Index: unicodeobject.c MATCH is used in a couple of places; it's probably a better idea to change the macro (in Include/unicodeobject.h). MAL? </F>
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4