Commits

Maciej Fijalkowski committed 9158464

change the resie strategy to more resemble rdict

Comments (0)

Files changed (1)

pypy/rlib/dict.py

             if index == FREE:
                 self.filled += 1
                 if self.filled * 3 > len(self.indices) * 2:
-                    self._resize(4 * self.__len__())
+                    if self.used < 50000:
+                        self._resize(4 * self.__len__())
+                    else:
+                        self._resize(2 * self.__len__())
         else:
             self.values[index].value = _cast_to_gcref(value)