[pypy-commit] pypy default: Perform fewer dict lookups here
alex_gaynor
noreply at buildbot.pypy.org
Sun Sep 29 18:58:05 CEST 2013
Author: Alex Gaynor <alex.gaynor at gmail.com>
Branch:
Changeset: r67135:7066133c5cfc
Date: 2013-09-29 09:57 -0700
http://bitbucket.org/pypy/pypy/changeset/7066133c5cfc/
Log: Perform fewer dict lookups here
diff --git a/rpython/jit/metainterp/heapcache.py b/rpython/jit/metainterp/heapcache.py
--- a/rpython/jit/metainterp/heapcache.py
+++ b/rpython/jit/metainterp/heapcache.py
@@ -87,9 +87,11 @@
def _escape(self, box):
if box in self.new_boxes:
self.new_boxes[box] = False
- if box in self.dependencies:
- deps = self.dependencies[box]
- del self.dependencies[box]
+ try:
+ deps = self.dependencies.pop(box)
+ except KeyError:
+ pass
+ else:
for dep in deps:
self._escape(dep)
More information about the pypy-commit
mailing list