[pypy-svn] r5336 - pypy/trunk/src/pypy/objspace/std
arigo at codespeak.net
arigo at codespeak.net
Sat Jun 26 01:01:06 CEST 2004
Author: arigo
Date: Sat Jun 26 01:01:05 2004
New Revision: 5336
Modified:
pypy/trunk/src/pypy/objspace/std/dictobject.py
Log:
* Ouak! A pdb breakpoint we forgot here long ago. I don't understand why the
test suite suddenly triggers it while it didn't use to.
* A lot of time was spent in resizing dictionaries. Starting with a minimum
size of 8 seems to help.
Modified: pypy/trunk/src/pypy/objspace/std/dictobject.py
==============================================================================
--- pypy/trunk/src/pypy/objspace/std/dictobject.py (original)
+++ pypy/trunk/src/pypy/objspace/std/dictobject.py Sat Jun 26 01:01:05 2004
@@ -19,8 +19,8 @@
W_Object.__init__(w_self, space)
w_self.used = 0
- w_self.data = [[r_uint(0), None, None]]
- w_self.resize(len(list_pairs_w)*2)
+ w_self.data = []
+ w_self.resize(min(len(list_pairs_w)*2, 8))
for w_k, w_v in list_pairs_w:
w_self.insert(w_self.hash(w_k), w_k, w_v)
@@ -76,10 +76,6 @@
c = 0
while 1:
c += 1
- if c > 1000:
- import pdb
- pdb.set_trace()
-
i = (i << 2) + i + perturb + 1
entry = self.data[i%len(self.data)]
if entry[1] is None:
More information about the Pypy-commit
mailing list