bug-grep
[Top][All Lists]
Advanced

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

bug#19358: [PATCH 1/3] grep: use Aho-Corasick algorithm to search multip


From: Norihiro Tanaka
Subject: 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 <address@hidden> 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.






reply via email to

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