This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH v2] Improve memmem.
- From: Paul Eggert <eggert at cs dot ucla dot edu>
- To: OndÅej BÃlka <neleai at seznam dot cz>
- Cc: libc-alpha at sourceware dot org
- Date: Thu, 14 May 2015 23:08:42 -0700
- Subject: Re: [PATCH v2] Improve memmem.
- Authentication-results: sourceware.org; auth=none
- References: <20150513000329 dot GA23595 at domone> <55537C4A dot 20001 at cs dot ucla dot edu> <20150513185107 dot GA4100 at domone> <5553F532 dot 6060604 at cs dot ucla dot edu> <20150514092926 dot GA7949 at domone>
OndÅej BÃlka wrote:
I am using different end here
+ const unsigned char *haystack_end = (const unsigned char *)
+ haystack_start + haystack_len
+ - needle_len + 1;
Ah, sorry, didn't see that. But in that case the name 'haystack_end' is
misleading -- that's not the haystack's end, but is something else. So a
renaming would appear to be in order.
Main motivations is that pairs are still too common
Too common where? Do we have traces of actual programs?