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

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

[debbugs-tracker] bug#21696: closed ([PATCH 1/2] grep: improvement of pe


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#21696: closed ([PATCH 1/2] grep: improvement of performance of grep -Fw)
Date: Sat, 17 Oct 2015 05:49:01 +0000

Your message dated Fri, 16 Oct 2015 22:48:07 -0700
with message-id <address@hidden>
and subject line Re: bug#21696: [PATCH 1/2] grep: improvement of performance of 
grep -Fw
has caused the debbugs.gnu.org bug report #21696,
regarding [PATCH 1/2] grep: improvement of performance of grep -Fw
to be marked as done.

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


-- 
21696: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=21696
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: [PATCH 1/2] grep: improvement of performance of grep -Fw Date: Sat, 17 Oct 2015 10:13:36 +0900
I found that grep -Fw is extremely slow in spite of whether in
multibyte locales or not.

$ yes 'abcdefg hijklmn opqrstu vwxyz' | head -100000 >k
$ time -p env LC_ALL=C grep -Fw vwxy k
real 14.03
user 12.51
sys 0.74
$ time -p env LC_ALL=ja_JP.eucJP grep -Fw vwxy k
real 14.29
user 12.67
sys 0.50

$ time -p env LC_ALL=C grep -w vwxy k
real 0.11
user 0.01
sys 0.09
$ time -p env LC_ALL=ja_JP.eucJP grep -w vwxy k
real 0.89
user 0.71
sys 0.15

First patch fixes the problem.  Second patch changes as using grep
matcher for grep -Fw in single byte locales.

In single byte locales, DFA (not regex) is also used for words matching,
and it is very fast as above result.

Attachment: 0001-grep-improvement-of-performance-of-grep-Fw.patch
Description: Text document

Attachment: 0002-grep-use-grep-matcher-for-grep-Fw-in-single-byte-loc.patch
Description: Text document


--- End Message ---
--- Begin Message --- Subject: Re: bug#21696: [PATCH 1/2] grep: improvement of performance of grep -Fw Date: Fri, 16 Oct 2015 22:48:07 -0700 User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 Thanks for those performance improvements. I installed them, with some minor changes to commentary. I also installed a couple of minor tweaks to the code, to use memrchr and to simplify the multibyte test. Attached are the revised set of patches.

Attachment: 0001-grep-improve-performance-of-grep-Fw.patch
Description: Text document

Attachment: 0002-grep-use-memchr-memrchar.patch
Description: Text document

Attachment: 0003-grep-use-grep-matcher-for-grep-Fw-when-unibyte.patch
Description: Text document

Attachment: 0004-grep-simplify-previous-change.patch
Description: Text document

Attachment: 0005-maint-add-news-item.patch
Description: Text document


--- End Message ---

reply via email to

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