summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd Gamblin <tgamblin@llnl.gov>2016-05-29 23:51:39 -0700
committerTodd Gamblin <tgamblin@llnl.gov>2016-08-08 21:04:23 -0700
commitab049eca4129b389e7dab53d6dd475b24f8099ed (patch)
tree42595511a73d7cc92656e0cdebeb2c7388b9a0c5
parent37fc2583136f1abd5d39b15bb05d2102d182003a (diff)
downloadspack-ab049eca4129b389e7dab53d6dd475b24f8099ed.tar.gz
spack-ab049eca4129b389e7dab53d6dd475b24f8099ed.tar.bz2
spack-ab049eca4129b389e7dab53d6dd475b24f8099ed.tar.xz
spack-ab049eca4129b389e7dab53d6dd475b24f8099ed.zip
Faster key in FlagMap._cmp_key
-rw-r--r--lib/spack/spack/spec.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py
index 1300f35ca4..b9d9d3e0a4 100644
--- a/lib/spack/spack/spec.py
+++ b/lib/spack/spack/spec.py
@@ -438,8 +438,7 @@ class FlagMap(HashableMap):
return clone
def _cmp_key(self):
- return ''.join(str(key) + ' '.join(str(v) for v in value)
- for key, value in sorted(self.items()))
+ return tuple((k, tuple(v)) for k, v in sorted(self.iteritems()))
def __str__(self):
sorted_keys = filter(