[Python-checkins] cpython: Use a dict for faster sysconfig startup (issue #13150)

antoine.pitrou python-checkins at python.org
Tue Oct 11 16:11:15 CEST 2011


http://hg.python.org/cpython/rev/ed0bc92fed68
changeset:   72854:ed0bc92fed68
user:        Antoine Pitrou <solipsis at pitrou.net>
date:        Tue Oct 11 16:07:30 2011 +0200
summary:
  Use a dict for faster sysconfig startup (issue #13150)

files:
  Lib/sysconfig.py |  2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)


diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py
--- a/Lib/sysconfig.py
+++ b/Lib/sysconfig.py
@@ -24,7 +24,7 @@
 # XXX _CONFIG_DIR will be set by the Makefile later
 _CONFIG_DIR = os.path.normpath(os.path.dirname(__file__))
 _CONFIG_FILE = os.path.join(_CONFIG_DIR, 'sysconfig.cfg')
-_SCHEMES = RawConfigParser()
+_SCHEMES = RawConfigParser(dict_type=dict)   # Faster than OrderedDict
 _SCHEMES.read(_CONFIG_FILE)
 _VAR_REPL = re.compile(r'\{([^{]*?)\}')
 

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list