From 646d64748ab28dca9e30823ab6472e06cf9bd981 Mon Sep 17 00:00:00 2001 From: William Deegan Date: Fri, 30 Jun 2017 11:48:48 -0700 Subject: Micro optimization "." in string is approx 10x faster than string.find('.') >= 0 according to timeit testing. --- src/engine/SCons/Subst.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/engine/SCons/Subst.py b/src/engine/SCons/Subst.py index 3c9b390..9aa4bbc 100644 --- a/src/engine/SCons/Subst.py +++ b/src/engine/SCons/Subst.py @@ -438,7 +438,7 @@ def scons_subst(strSubst, env, mode=SUBST_RAW, target=None, source=None, gvars={ return s else: key = s[1:] - if key[0] == '{' or key.find('.') >= 0: + if key[0] == '{' or '.' in key: if key[0] == '{': key = key[1:-1] try: -- cgit v0.12