usage ◦ at least 1/3 of entries are empty ▪ otherwise, "probing" can be too slow ◦ one entry uses 3 words. (24bytes in 64bit machine) ◦ 8 * 8 * 3 = 192 bytes for minimum dict
drop key sharing dict? ▪ key sharing dict can save more memory. • But __slots__ can be used for such cases! ▪ performance improvements in some microbench • Is it matter for real case? __slots__? ▪ Needs consensus • it's more difficult than implementation
can be permitted ◦ "skipped" keys are prohibited ◦ deletion is also prohibited • Otherwise, stop "key sharing" ◦ `self.x = None` is faster than `del self.x`
namespace ◦ all keys are interned string ◦ only pointer comparison ◦ no "hash" in entry -> more compact • OrderedKey based on new dict ◦ no more doubly linked list ◦ `od.move_to_end(k, last=False)` is difficult, but it's possible • functools.lru_cache ◦ no more doubly linked list ◦ Using `od.move_to_end(key)`