GNU bug report logs - #19358
[PATCH 1/3] grep: use Aho-Corasick algorithm to search multiple fixed words

Previous Next

Package: grep;

Reported by: Norihiro Tanaka <noritnk <at> kcn.ne.jp>

Date: Fri, 12 Dec 2014 15:59:01 UTC

Severity: normal

Tags: patch

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


Message #11 received at 19358 <at> debbugs.gnu.org (full text, mbox):

From: Norihiro Tanaka <noritnk <at> kcn.ne.jp>
To: Jim Meyering <jim <at> meyering.net>
Cc: 19358 <at> debbugs.gnu.org
Subject: Re: bug#19358: [PATCH 1/3] grep: use Aho-Corasick algorithm to search
 multiple fixed words
Date: Thu, 06 Aug 2015 22:10:08 +0900
On Wed, 5 Aug 2015 21:12:33 -0700
Jim Meyering <jim <at> meyering.net> wrote:

> This sounds useful, but I discovered that the new code is not
> triggered even once by any of our tests. As such, I suspect that
> it is not justified to add these new conditionals in code that is
> often inlined.  Do you have experiments that demonstrate how
> that final patch helps?

Thanks for reviewing.  It is effective in only special case.  Could you
try following test for not patched and patched?

  $ printf 'a\nb\n' >pat
  $ yes $(printf %040d 0) | head -10000000 >in
  $ time -p src/grep -Ff pat in

In my machine, patched version is about 10% faster than not patched.





This bug report was last modified 8 years and 353 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.