[Python-Dev] Tunable parameters in dictobject.c (was dictnotes.txt out of date?) (original) (raw)
Raymond Hettinger raymond.hettinger at gmail.com
Thu Jun 14 16:01:08 CEST 2012
- Previous message: [Python-Dev] Tunable parameters in dictobject.c (was dictnotes.txt out of date?)
- Next message: [Python-Dev] Tunable parameters in dictobject.c (was dictnotes.txt out of date?)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Jun 14, 2012, at 4:32 AM, Kristján Valur Jónsson wrote:
I would like to two or more compile time settings to choose from: Memory optimal, speed optimal, (and mix).
A compile time option would be nice.
The default should be what we've had though. The new settings cause a lot more collisions and resizes. The resizes themselves have more collisions than before (there are few collisions when resizing into a quadrupled dict than into a doubled dict).
Dicts get their efficiency from sparseness. Reducing the mindict size from 8 to 4 causes substantially more collisions in small dicts and gets closer to a linear search of a small tuple.
Raymond -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20120614/b55a61a1/attachment.html>
- Previous message: [Python-Dev] Tunable parameters in dictobject.c (was dictnotes.txt out of date?)
- Next message: [Python-Dev] Tunable parameters in dictobject.c (was dictnotes.txt out of date?)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]