summaryrefslogtreecommitdiff
path: root/implicit.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
commitcc85b927cdc1a4dad3217842215903a45044fc43 (patch)
tree74ae34c9306f5dde33e258c4181215ee04d4203f /implicit.c
parentbee4d93a591f7f729717f6079f7d62ef555d9887 (diff)
downloadgunmake-cc85b927cdc1a4dad3217842215903a45044fc43.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 'implicit.c')
-rw-r--r--implicit.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/implicit.c b/implicit.c
index 9712780..97233a6 100644
--- a/implicit.c
+++ b/implicit.c
@@ -634,7 +634,7 @@ pattern_search (struct file *file, int archive,
p = variable_expand_for_file (depname, file);
/* Parse the expanded string. */
- dl = PARSE_FILE_SEQ (&p, struct dep, order_only ? '\0' : '|',
+ dl = PARSE_FILE_SEQ (&p, struct dep, order_only ? MAP_NUL : MAP_PIPE,
add_dir ? dir : NULL, 0);
for (d = dl; d != NULL; d = d->next)