bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: memmem speedup


From: Bruno Haible
Subject: Re: memmem speedup
Date: Wed, 9 Jan 2008 00:07:16 +0100
User-agent: KMail/1.5.4

James Youngman wrote:
> ... searching for a constant needle in a large
> number of haystacks.  In such cases, the preparation only needs to be
> done once at all.   In the specific case of findutils, locate will
> typically search for a single needle in one or two million haystacks.
>  Of course, locate also always knows the length of both the needle and
> the haystack, too.

You need a different API for doing that. See [1] for a sketch
(s/fnmatch/memmem/g).

Bruno

[1] http://lists.gnu.org/archive/html/bug-gnulib/2007-12/msg00071.html





reply via email to

[Prev in Thread] Current Thread [Next in Thread]