Update from Mark Shannon.
This commit is contained in:
parent
e28aba7b6b
commit
8b0a407072
19
pep-0412.txt
19
pep-0412.txt
|
@ -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
|
The iteration order of dictionaries was never defined and has always been
|
||||||
arbitrary; it is different for Jython and PyPy.
|
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
|
References
|
||||||
==========
|
==========
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue