]> git.ipfire.org Git - thirdparty/make.git/commitdiff
Do not use STOP_SET for singleton compares.
authorPaolo Bonzini <pbonzini@redhat.com>
Fri, 11 Aug 2017 11:44:33 +0000 (13:44 +0200)
committerPaul Smith <psmith@gnu.org>
Sat, 11 Nov 2017 15:08:30 +0000 (10:08 -0500)
Compare against '$' directly rather than using MAP_VARIABLE.
This saves ~10% for find_map_function, which is the top hotspot in
QEMU's no-op build.  The build is sped up overall by about 1.5%
more (from 11.1s to 10.95s).

* read.c (find_map_function): Do not compare against singleton sets.

read.c

diff --git a/read.c b/read.c
index 2cd497a4245fa58f05a5e2ed8ec9c3107e208098..db1a42d0780477d0e75b3cd2a44b831473cbb256 100644 (file)
--- a/read.c
+++ b/read.c
@@ -2249,7 +2249,7 @@ find_map_unquote (char *string, int stopmap)
         break;
 
       /* If we stopped due to a variable reference, skip over its contents.  */
-      if (STOP_SET (*p, MAP_VARIABLE))
+      if (*p == '$')
         {
           char openparen = p[1];