bug-grep
[Top][All Lists]
Advanced

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

bug#17230: [PATCH 1/2] grep: may also use Boyer-Moore algorithm for case


From: Norihiro Tanaka
Subject: bug#17230: [PATCH 1/2] grep: may also use Boyer-Moore algorithm for case-insensitive matching
Date: Thu, 24 Apr 2014 08:59:38 +0900

Paul Eggert wrote:
> That's odd, as I'm not observing this slowdown.

Though I apply 17230.diff and tests, I don't observed slowdown.  However,
I cann't find macros `BM_DELTA2_SEARCH' etc in 17230.diff.  Could you also
consider them, and run (A) instead of (B)?  It means that overheads by
`yes' and `head' should be ignored.

(A)
$ yes jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj | head -10000000 >k
$ grep -i jk

(B)
$ yes jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj | head -10000000 | grep -i jk

I attach the difference between current master and my version.

Though I don't analyze detail still, don't seem that overhead by check
for `trans' in `tr' function, which is called each time the comparison
of a character, can be ignorable.

Norihiro

Attachment: 17230.diff
Description: Text document


reply via email to

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