[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#17448: [PATCH] grep: retry DFA superset after matched with multiple
From: |
Norihiro Tanaka |
Subject: |
bug#17448: [PATCH] grep: retry DFA superset after matched with multiple lines by it |
Date: |
Fri, 09 May 2014 23:40:48 +0900 |
Currently, when matched with multiple lines by DFA superset, return to
KWset. However, it won't be wrong probably, because if matches with
multiple lines by DFA superset, also matches with single line there with
high probability. Further more, if return to KWset after matched with
multiple line by DFA superset, dfafast won't work effectively.
This patch changes to retry DFA superset immediately after matched with
multiple lines by it.
I confirmed the patch by following tests.
$ yes abcdabc | head -50000000 >k
$ env LC_ALL=C time -p src/grep '\(ab\)cd\1d' k
before:
real 3.48 user 3.41 sys 0.06
after:
real 2.14 user 2.07 sys 0.06
Norihiro
0001-grep-retry-DFA-superset-after-matched-with-multiple-.patch
Description: Text document
- bug#17448: [PATCH] grep: retry DFA superset after matched with multiple lines by it,
Norihiro Tanaka <=