diff options
author | William Deegan <bill@baddogconsulting.com> | 2017-06-30 18:48:48 (GMT) |
---|---|---|
committer | William Deegan <bill@baddogconsulting.com> | 2017-06-30 18:48:48 (GMT) |
commit | 646d64748ab28dca9e30823ab6472e06cf9bd981 (patch) | |
tree | a9033a76ec40fec082d6f501eb6b880681f3a80e /src/engine | |
parent | dac36853a206edc24bbaf2ee8e706f4bd3fd77a8 (diff) | |
download | SCons-646d64748ab28dca9e30823ab6472e06cf9bd981.zip SCons-646d64748ab28dca9e30823ab6472e06cf9bd981.tar.gz SCons-646d64748ab28dca9e30823ab6472e06cf9bd981.tar.bz2 |
Micro optimization "." in string is approx 10x faster than string.find('.') >= 0 according to timeit testing.
Diffstat (limited to 'src/engine')
-rw-r--r-- | src/engine/SCons/Subst.py | 2 |
1 files changed, 1 insertions, 1 deletions
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: |