[Python-checkins] peps: Update from Mark Shannon.

martin.v.loewis python-checkins at python.org
Tue Feb 28 21:40:44 CET 2012


http://hg.python.org/peps/rev/f10e37d9ba49
changeset:   4095:f10e37d9ba49
user:        Martin v. Löwis <martin at v.loewis.de>
date:        Tue Feb 28 21:40:37 2012 +0100
summary:
  Update from Mark Shannon.

files:
  pep-0412.txt |  19 +++++++++++++++++++
  1 files changed, 19 insertions(+), 0 deletions(-)


diff --git a/pep-0412.txt b/pep-0412.txt
--- a/pep-0412.txt
+++ b/pep-0412.txt
@@ -149,6 +149,25 @@
 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
 ==========
 

-- 
Repository URL: http://hg.python.org/peps


More information about the Python-checkins mailing list