Update from Mark Shannon.

This commit is contained in:
Martin v. Löwis 2012-02-28 21:40:37 +01:00
parent e28aba7b6b
commit 8b0a407072
1 changed files with 19 additions and 0 deletions

View File

@ -149,6 +149,25 @@ implementation are already broken and should be fixed to use the API.
The iteration order of dictionaries was never defined and has always been
arbitrary; it is different for Jython and PyPy.
Alternative Implementation
--------------------------
An alternative implementation for split tables, which could save even more
memory, is to store an index in the value field of the keys table (instead
of ignoring the value field). This index would explicitly state where in the
value array to look. The value array would then only require 1 field for each
usable slot in the key table, rather than each slot in the key table.
This "indexed" version would reduce the size of value array by about
one third. The keys table would need an extra "values_size" field, increasing
the size of combined dicts by one word.
The extra indirection adds more complexity to the code, potentially reducing
performance a little.
The "indexed" version will not be included in this implementation,
but should be considered deferred rather than rejected,
pending further experimentation.
References
==========