Skip to content
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: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent 84ef9da commit 9d1a7c203ce8f24aa1aa255ccdec3ace194012c6 @jacobian jacobian committed
Showing with 2 additions and 1 deletion.
  1. +2 −1 django/utils/
3 django/utils/
@@ -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:

0 comments on commit 9d1a7c2

Please sign in to comment.
Something went wrong with that request. Please try again.