Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Micro-optomization to SortedDict.values(). Yes, it looks silly, but i…

…t shaves 30 seconds (5%) off the run time of the test suite.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@11494 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 9d1a7c203ce8f24aa1aa255ccdec3ace194012c6 1 parent 84ef9da
@jacobian jacobian authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  django/utils/datastructures.py
View
3  django/utils/datastructures.py
@@ -117,7 +117,8 @@ def iterkeys(self):
return iter(self.keyOrder)
def values(self):
- return [super(SortedDict, self).__getitem__(k) for k in self.keyOrder]
+ super_get = super(SortedDict, self).__getitem__
+ return [super_get(k) for k in self.keyOrder]
def itervalues(self):
for key in self.keyOrder:
Please sign in to comment.
Something went wrong with that request. Please try again.