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