@@ -43,6 +43,10 @@ Membership Testing
4343 Similar access patterns occur with replacement dictionaries
4444 such as with the % formatting operator.
4545
46+ Dynamic Mappings
47+ Characterized by deletions interspersed with adds and replacments.
48+ Performance benefits greatly from the re-use of dummy entries.
49+
4650
4751Data Layout (assuming a 32-bit box with 64 bytes per cache line)
4852----------------------------------------------------------------
@@ -91,6 +95,12 @@ keys are all strings, whether reads or writes dominate, the exact
9195hash values of the keys (some sets of values have fewer collisions than
9296others). Any one test or benchmark is likely to prove misleading.
9397
98+ While making a dictionary more sparse reduces collisions, it impairs
99+ iteration and key listing. Those methods loop over every potential
100+ entry. Doubling the size of dictionary results in twice as many
101+ non-overlapping memory accesses for keys(), items(), values(),
102+ __iter__(), iterkeys(), iteritems(), itervalues(), and update().
103+
94104
95105Results of Cache Locality Experiments
96106-------------------------------------
@@ -165,7 +175,7 @@ sizes and access patterns, the user may be able to provide useful hints.
1651751) For example, if membership testing or lookups dominate runtime and memory
166176 is not at a premium, the user may benefit from setting the maximum load
167177 ratio at 5% or 10% instead of the usual 66.7%. This will sharply
168- curtail the number of collisions.
178+ curtail the number of collisions but will increase iteration time .
169179
1701802) Dictionary creation time can be shortened in cases where the ultimate
171181 size of the dictionary is known in advance. The dictionary can be
0 commit comments