--- Begin Message ---
Subject: |
[PATCH] grep: always convert fgrep to grep |
Date: |
Tue, 06 May 2014 22:36:57 +0900 |
fgrep uses different matcher from grep, but there is no reason why it
must be so. Further more, fgrep matcher is slower than grep matcher in
many cases, because it never uses DFA. This patch converts fgrep to grep
any time.
By the way, if `FGREP_NO_DFA' env. is set, fgrep still uses fgrep matcher.
It may be required in some cases. fgrep matcher requires less memory
than grep matcher even if a pattern is too long, and/or is faster than
it in some cases to have multiple patterns.
0001-grep-always-convert-fgrep-to-grep.patch
Description: Text document
--- End Message ---
--- Begin Message ---
Subject: |
bug#17420: [PATCH] grep: always convert fgrep to grep |
Date: |
Sun, 11 May 2014 08:39:09 +0900 |
> Is there a better heuristic for deciding whether to use Commentz-Walter?
No, I have no idea.
> Can the Galil rule be adapted to Commentz-Walter?
No, I don't know even whether we can do it.
> Another possibility might be to replace Commentz-Walter with some other
> algorithm (Aho-Corasick, modified Wu-Manber, etc.).
DFA is already like Aho-Corasick. So even if we imprement them, there
will be no merit much in spite of big changes.
The argument has convinced me that we shouldn't apply the patch now.
Thanks,
Norihiro
--- End Message ---