[Python-Dev] A new dictionary implementation
mark at hotpy.org
Sun Jan 29 11:31:48 CET 2012
Now that issue 13703 has been largely settled,
I want to propose my new dictionary implementation again.
It is a little more polished than before.
Object-oriented benchmarks use considerably less memory and are
sometimes faster (by a small amount).
(I've only benchmarked on my old 32bit machine)
E.g 2to3 No speed change -28% memory
GCbench +10% speed -47% memory
Other benchmarks show little or no change in behaviour,
mainly minor memory savings.
If an application is OO and uses lots of memory
the new dict will save a lot of memory and maybe boost performance.
Other applications will be largely unaffected.
It passes all the tests.
(I had to change a couple that relied on dict repr() ordering)
More information about the Python-Dev