Author: Maciej Fijalkowski <[email protected]>
Branch: rdict-experiments
Changeset: r59666:9158464f10b2
Date: 2013-01-03 11:43 +0200
http://bitbucket.org/pypy/pypy/changeset/9158464f10b2/
Log: change the resie strategy to more resemble rdict
diff --git a/pypy/rlib/dict.py b/pypy/rlib/dict.py
--- a/pypy/rlib/dict.py
+++ b/pypy/rlib/dict.py
@@ -112,7 +112,10 @@
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)
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit