[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gawk-diffs] [SCM] gawk branch, master, updated. gawk-4.1.0-914-g204bec7
From: |
Arnold Robbins |
Subject: |
[gawk-diffs] [SCM] gawk branch, master, updated. gawk-4.1.0-914-g204bec7 |
Date: |
Mon, 03 Nov 2014 18:36:00 +0000 |
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 "gawk".
The branch, master has been updated
via 204bec7af64c61489e37007d45de936482007977 (commit)
via c9936ef0d4d7a7f263831bead31c5ffcf8b0a8d3 (commit)
from af1cce266d1b6c875cf01db6c47ada89cbf64411 (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.sv.gnu.org/cgit/gawk.git/commit/?id=204bec7af64c61489e37007d45de936482007977
commit 204bec7af64c61489e37007d45de936482007977
Merge: af1cce2 c9936ef
Author: Arnold D. Robbins <address@hidden>
Date: Mon Nov 3 20:35:40 2014 +0200
Merge branch 'gawk-4.1-stable'
http://git.sv.gnu.org/cgit/gawk.git/commit/?id=c9936ef0d4d7a7f263831bead31c5ffcf8b0a8d3
commit c9936ef0d4d7a7f263831bead31c5ffcf8b0a8d3
Author: Arnold D. Robbins <address@hidden>
Date: Mon Nov 3 20:34:25 2014 +0200
Use dfa superset to speed up matching.
diff --git a/ChangeLog b/ChangeLog
index dd3a494..a7b6696 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2014-11-03 Norihiro Tanaka <address@hidden>
+
+ * re.c (research): Use dfa superset to improve matching speed.
+
2014-11-02 Arnold D. Robbins <address@hidden>
* profile.c (div_on_left_mul_on_right): New function.
diff --git a/re.c b/re.c
index 9118129..12c212a 100644
--- a/re.c
+++ b/re.c
@@ -284,13 +284,18 @@ research(Regexp *rp, char *str, int start,
if (rp->dfa && ! no_bol && ! need_start) {
char save;
size_t count = 0;
+ struct dfa *superset = dfasuperset(rp->dfareg);
/*
* dfa likes to stick a '\n' right after the matched
* text. So we just save and restore the character.
*/
save = str[start+len];
- ret = dfaexec(rp->dfareg, str+start, str+start+len, true,
- &count, &try_backref);
+ if (superset)
+ ret = dfaexec(superset, str+start, str+start+len,
+ true, NULL, NULL);
+ if (ret)
+ ret = dfaexec(rp->dfareg, str+start, str+start+len,
+ true, &count, &try_backref);
str[start+len] = save;
}
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 4 ++++
re.c | 9 +++++++--
2 files changed, 11 insertions(+), 2 deletions(-)
hooks/post-receive
--
gawk
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gawk-diffs] [SCM] gawk branch, master, updated. gawk-4.1.0-914-g204bec7,
Arnold Robbins <=