<div dir="ltr"><br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="">
>>> All this looks similar to Raymond's proof-of-concept for a compact dictionary (ordering is a side effect). [1]<br>
>><br>
>> But his design only preserves ordering if you never delete (or move, but he doesn't have an API for that).<br>
><br>
> This is only because preserving ordering is not a goal for a dict.<br>
<br>
</span>Sure. But it is the goal for OrderedDict. Which is exactly why a design that makes sense for dict doesn't necessarily make sense for OrderedDict, unless you add something else. The hash table of list nodes works as such a something else. But Raymond's array doesn't (and isn't intended to).<br>
<span class=""><br></span></blockquote><div><br></div><div>FWIW, I think PyPy's dict implementation is advanced version of Raymond's.<br></div><div>More compact and preserves order on deletion.<br></div><div><br><a href="http://morepypy.blogspot.jp/2015/01/faster-more-memory-efficient-and-more.html">http://morepypy.blogspot.jp/2015/01/faster-more-memory-efficient-and-more.html</a><br></div><br></div></div></div>