summaryrefslogtreecommitdiff
path: root/rule.c
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>2013-06-22 00:22:08 -0400
committerPaul Smith <psmith@gnu.org>2013-06-22 00:22:08 -0400
commite952841ff3506bf69e61202e5870c24b4b0992d4 (patch)
tree74ae34c9306f5dde33e258c4181215ee04d4203f /rule.c
parentbfe9aeba925568121373ca264ac32cf3bb86814d (diff)
downloadmake-e952841ff3506bf69e61202e5870c24b4b0992d4.tar.gz
Create a character map to use for locating stop-points in strings.
In various places we were passing flags and characters to compare, then using complex conditionals to see where to stop in string searches. Performance numbers reveal that we were spending as much as 23% of our processing time in these functions, most of it in the comparison lines. Instead create a character map and use a single bitwise comparison to determine if this is any one of the stop characters.
Diffstat (limited to 'rule.c')
-rw-r--r--rule.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/rule.c b/rule.c
index a1f1e7af..9a9e2294 100644
--- a/rule.c
+++ b/rule.c
@@ -373,7 +373,7 @@ install_pattern_rule (struct pspec *p, int terminal)
++r->suffixes[0];
ptr = p->dep;
- r->deps = PARSE_FILE_SEQ (&ptr, struct dep, '\0', NULL, 0);
+ r->deps = PARSE_FILE_SEQ (&ptr, struct dep, MAP_NUL, NULL, 0);
if (new_pattern_rule (r, 0))
{