[Python-Dev] I think my set module is ready for prime time;
Wed, 24 Jan 2001 16:40:04 +0200
Greg Ewing wrote:
> Neil Schemenauer <email@example.com>:
> > Basicly, we would
> > use the implementation of PyDict but drop the values.
> This could be incorporated into PyDict. Instead of storing keys and
> values in the same array, keep them in separate arrays and only
> allocate the values array the first time someone stores a value other
> than 1.
Very good idea. It fits also in my view of how dicts should be
implemented: Keep keys and values apart, since this information
has different access patterns.
I think (or at least hope) that dictionaries become faster,
when hashes, keys and values are in seperate areas, giving more
cache hits. Not sure if hashes and keys should be apart, but
sure for values.
ciao - chris
Christian Tismer :^) <mailto:firstname.lastname@example.org>
Mission Impossible 5oftware : Have a break! Take a ride on Python's
Kaunstr. 26 : *Starship* http://starship.python.net
14163 Berlin : PGP key -> http://wwwkeys.pgp.net
PGP Fingerprint E182 71C7 1A9D 66E9 9D15 D3CC D4D7 93E2 1FAE F6DF
where do you want to jump today? http://www.stackless.com