grep-commit
[Top][All Lists]
Advanced

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

grep branch, master, updated. v2.25-73-g29b36e6


From: Paul Eggert
Subject: grep branch, master, updated. v2.25-73-g29b36e6
Date: Fri, 2 Sep 2016 04:54:01 +0000 (UTC)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "grep".

The branch, master has been updated
       via  29b36e655aca16c4a28a7d8179c3096ebecf9815 (commit)
       via  d67b7488d4ba337b96a97ebc4a632cd1a9cab168 (commit)
      from  cd3d2b33f79dcc73d9e4a432f9989cd41b7e8eef (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/grep.git/commit/?id=29b36e655aca16c4a28a7d8179c3096ebecf9815


commit 29b36e655aca16c4a28a7d8179c3096ebecf9815
Author: Paul Eggert <address@hidden>
Date:   Thu Sep 1 21:49:51 2016 -0700

    grep: use regex fastmap unless -i
    
    This builds on a suggestion by Norihiro Tanaka (Bug#24009).
    * src/dfasearch.c (GEAcompile): Use a fastmap unless -i.
    This improves performance 20x for me using the first benchmark
    given in Bug#24009.

diff --git a/src/dfasearch.c b/src/dfasearch.c
index b5ae623..0838e1f 100644
--- a/src/dfasearch.c
+++ b/src/dfasearch.c
@@ -151,7 +151,10 @@ GEAcompile (char const *pattern, size_t size, reg_syntax_t 
syntax_bits)
       struct re_pattern_buffer *pat = &patterns[pcount];
       pat->buffer = NULL;
       pat->allocated = 0;
-      pat->fastmap = NULL;
+
+      /* Do not use a fastmap with -i, to work around glibc Bug#20381.  */
+      pat->fastmap = match_icase ? NULL : xmalloc (UCHAR_MAX + 1);
+
       pat->translate = NULL;
 
       char const *err = re_compile_pattern (p, len, pat);

http://git.savannah.gnu.org/cgit/grep.git/commit/?id=d67b7488d4ba337b96a97ebc4a632cd1a9cab168


commit 29b36e655aca16c4a28a7d8179c3096ebecf9815
Author: Paul Eggert <address@hidden>
Date:   Thu Sep 1 21:49:51 2016 -0700

    grep: use regex fastmap unless -i
    
    This builds on a suggestion by Norihiro Tanaka (Bug#24009).
    * src/dfasearch.c (GEAcompile): Use a fastmap unless -i.
    This improves performance 20x for me using the first benchmark
    given in Bug#24009.

diff --git a/src/dfasearch.c b/src/dfasearch.c
index b5ae623..0838e1f 100644
--- a/src/dfasearch.c
+++ b/src/dfasearch.c
@@ -151,7 +151,10 @@ GEAcompile (char const *pattern, size_t size, reg_syntax_t 
syntax_bits)
       struct re_pattern_buffer *pat = &patterns[pcount];
       pat->buffer = NULL;
       pat->allocated = 0;
-      pat->fastmap = NULL;
+
+      /* Do not use a fastmap with -i, to work around glibc Bug#20381.  */
+      pat->fastmap = match_icase ? NULL : xmalloc (UCHAR_MAX + 1);
+
       pat->translate = NULL;
 
       char const *err = re_compile_pattern (p, len, pat);

-----------------------------------------------------------------------

Summary of changes:
 src/dfasearch.c |   78 +++++++++++++++++++++++++++++--------------------------
 1 file changed, 41 insertions(+), 37 deletions(-)


hooks/post-receive
-- 
grep



reply via email to

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