[Python-Dev] PyBench DictCreation (was Re: Performance compares)
Jeremy Hylton
jeremy@digicool.com
Thu, 17 May 2001 18:16:15 -0400 (EDT)
>>>>> "TP" == Tim Peters <tim@digicool.com> writes:
TP> I've got no interest in trying to restore the old behavior. A
TP> compromise may be to boost the minimum size of a non-empty dict
TP> from 4 to 8. As is, the only non-empty dicts that can get away
TP> with using the current minimum size of 4 have no more than 2
TP> elements. The question is whether such tiny non-empty dicts are
TP> common enough to make everyone else pay for "an extra" resize.
I also did a profile run on CreateInstances, which has a difference of
+55.54% on my machine. It's basically the same story. The instance
dictionary is getting resized more often with Python 2.1+ than it did
with Python 1.5.2. I wouldn't be surprised if several more tests are
showing a slowdown with the same cause.
So boosting the minimum size sounds like a good thing.
Jeremy