This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/5514] memmem is O(n^2), but should be O(n)
- From: "ebb9 at byu dot net" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: 29 Mar 2008 16:43:49 -0000
- Subject: [Bug libc/5514] memmem is O(n^2), but should be O(n)
- References: <20071220133012.5514.ebb9@byu.net>
- Reply-to: sourceware-bugzilla at sourceware dot org
------- Additional Comments From ebb9 at byu dot net 2008-03-29 16:43 -------
Created an attachment (id=2339)
--> (http://sourceware.org/bugzilla/attachment.cgi?id=2339&action=view)
fixed-allocation linear memmem/strstr
2008-03-29 Eric Blake <ebb9@byu.net>
Rewrite string searches to O(n) rather than O(n^2).
* string/str-two-way.h: New file, for linear fixed-allocation
string searching.
* string/memmem.c: New implementation.
* string/strstr.c: New implementation.
* string/strcasestr.c: New implementation.
--
What |Removed |Added
----------------------------------------------------------------------------
Attachment #2161 is|0 |1
obsolete| |
Attachment #2162 is|0 |1
obsolete| |
http://sourceware.org/bugzilla/show_bug.cgi?id=5514
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.