[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 6/6] do not use STOP_SET for singleton sets
From: |
Paolo Bonzini |
Subject: |
[PATCH 6/6] do not use STOP_SET for singleton sets |
Date: |
Fri, 11 Aug 2017 13:44:33 +0200 |
Compare against '$' directly rather than using MAP_VARIABLE. This
is a ~10% speedup 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.1 to 10.95 seconds).
* read.c (find_map_function): Do not compare against singleton sets.
---
read.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/read.c b/read.c
index 2cd497a..db1a42d 100644
--- 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];
--
2.13.3
- [PATCH v2 0/6] Miscellaneous speedup patches, Paolo Bonzini, 2017/08/11
- [PATCH 1/6] use Jenkins hash, Paolo Bonzini, 2017/08/11
- [PATCH 5/6] speedup parsing of functions, Paolo Bonzini, 2017/08/11
- [PATCH 6/6] do not use STOP_SET for singleton sets,
Paolo Bonzini <=
- [PATCH 3/6] use strchr/memmove in collapse_continuations, Paolo Bonzini, 2017/08/11
- [PATCH 2/6] use strchr for simple case of find_char_unquote, Paolo Bonzini, 2017/08/11
- [PATCH 4/6] remove MAP_PERCENT, Paolo Bonzini, 2017/08/11