Commits

Alex Gaynor committed 7066133

Perform fewer dict lookups here

Comments (0)

Files changed (1)

rpython/jit/metainterp/heapcache.py

     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)