emacs-bug-tracker
[Top][All Lists]
Advanced

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

[debbugs-tracker] bug#24037: closed ([PATCH] grep: always match single l


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#24037: closed ([PATCH] grep: always match single line only with DFA superset)
Date: Thu, 21 Jul 2016 11:58:02 +0000

Your message dated Thu, 21 Jul 2016 13:57:25 +0200
with message-id <address@hidden>
and subject line Re: bug#24037: [PATCH] grep: always match single line only 
with DFA superset
has caused the debbugs.gnu.org bug report #24037,
regarding [PATCH] grep: always match single line only with DFA superset
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
24037: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=24037
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: [PATCH] grep: always match single line only with DFA superset Date: Thu, 21 Jul 2016 00:26:17 +0900
When grep matcher uses DFA, I assumed that it might match multiline with
DFA superset, but it is wrong.  \n cannot occur inside a multibyte
character.  So an input always matches single line only with DFA superset.

Now set ALLOW_NL to 0, and remove loop.  It speeds up 2x in special case.

$ yes "$(printf 'a\nb')" | head -100000000 >k

(before)
$ time -p src/grep '\(a\|x\).\(b\|x\)' k
real 1.39
user 1.05
sys 0.31

(after)
$ time -p src/grep '\(a\|x\).\(b\|x\)' k
real 0.58
user 0.49
sys 0.09

Attachment: 0001-grep-always-match-single-line-only-with-DFA-superset.patch
Description: Text document


--- End Message ---
--- Begin Message --- Subject: Re: bug#24037: [PATCH] grep: always match single line only with DFA superset Date: Thu, 21 Jul 2016 13:57:25 +0200 User-agent: Mozilla/5.0 (X11; Linux i686; rv:45.0) Gecko/20100101 Thunderbird/45.2.0
Thanks again. I installed that.


--- End Message ---

reply via email to

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