diff options
author | Boris Kolpackov <boris@kolpackov.net> | 2009-09-25 15:51:11 +0000 |
---|---|---|
committer | Boris Kolpackov <boris@kolpackov.net> | 2009-09-25 15:51:11 +0000 |
commit | 48045f99e574d1d8e049a413f5b3f40d33898dc2 (patch) | |
tree | 252668457e4323d36344fc63c25f9cd6e6fd6fd7 | |
parent | 5973926ce63f7487359e137379dfdf33c743a3a2 (diff) | |
download | gunmake-48045f99e574d1d8e049a413f5b3f40d33898dc2.tar.gz |
Performance improvement.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | implicit.c | 4 |
2 files changed, 9 insertions, 0 deletions
@@ -1,5 +1,10 @@ 2009-09-25 Boris Kolpackov <boris@codesynthesis.com> + * implicit.c (pattern_search): Terminate early if we haven't + found any rules to try (performance improvement). + +2009-09-25 Boris Kolpackov <boris@codesynthesis.com> + * implicit.c (pattern_search): Merge three parallel arrays, TRYRULES, MATCHES, and CHECKED_LASTSLASH, into one array of struct TRYRULE. In the old version the latter two arrays @@ -390,6 +390,10 @@ pattern_search (struct file *file, int archive, } } + /* Bail out early if we haven't found any rules. */ + if (nrules == 0) + goto done; + /* If we have found a matching rule that won't match all filenames, retroactively reject any non-"terminal" rules that do always match. */ if (specific_rule_matched) |