Subject: bug#17229: [PATCH 2/2] grep: speed-up by using memchr() in Boyer-Moore searching

From: Paul Eggert <[email-masked]>
Date: Wed, 23 Apr 2014 23:33:13 -0700

Norihiro Tanaka wrote:
> could you also test below for master and original grep-2.18?
>
> $ yes abcdabc | head -50000000 >../k
> $ env LANG=C time -p src/grep abcd.bd ../k
>
> Perhaps, later will be faster.

Yes, grep 2.18 is a bit faster on that benchmark for me; it's about 3.6s 
real-time, whereas the master is about 4.2s.

> 0001-grep-speed-up-by-replacing-incr-to-add-in-x86-and-x8.patch will fix
> it.  delta2 searching is higher cost than mind2 searching in original
> grep-2.18.  We need to reduce it for delta2 searching.

Unfortunately it doesn't help for me; it causes the same benchmark to 
take about 4.3s real-time.  Here, I am talking about the version 
resulting from applying the patch in 
<http://debbugs.gnu.org/cgi/bugreport.cgi?msg=22;filename=17230.diff;att=1;bug=17230> 
to the master.