GNU bug report logs - #17448
[PATCH] grep: retry DFA superset after matched with multiple lines by it

Previous Next

Package: grep;

Reported by: Norihiro Tanaka <noritnk <at> kcn.ne.jp>

Date: Fri, 9 May 2014 14:42:01 UTC

Severity: normal

Tags: patch

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Norihiro Tanaka <noritnk <at> kcn.ne.jp>
To: 17448 <at> debbugs.gnu.org
Subject: bug#17448: [PATCH] grep: retry DFA superset after matched with multiple lines by it
Date: Fri, 09 May 2014 23:40:48 +0900
[Message part 1 (text/plain, inline)]
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 (text/plain, attachment)]

This bug report was last modified 11 years and 17 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.