Hi all, About ordered dictionaries:
---------- Forwarded message ---------- From: Armin Rigo <ar...@tunes.org> Date: 3 January 2015 at 17:39 Subject: Re: [Python-Dev] More compact dictionaries with faster iteration To: Maciej Fijalkowski <fij...@gmail.com> Cc: Serhiy Storchaka <storch...@gmail.com>, "<python-...@python.org>" <python-...@python.org> Hi all, On 1 January 2015 at 14:52, Maciej Fijalkowski <fij...@gmail.com> wrote: > PS. I wonder who came up with the idea first, PHP or rhettinger and > who implemented it first (I'm pretty sure it was used in hippy before > it was used in Zend PHP) We'd need to look more in detail to that question, but a quick look made me find this Java code from 2012: https://code.google.com/r/wassermanlouis-guava/source/browse/guava/src/com/google/common/collect/CompactHashMap.java?name=refs/remotes/gcode-clone/compact-maps which implements almost exactly the original idea of Raymond. (It has a twist because Java doesn't support arrays of (int, int, Object, Object), and instead encodes it as one array of long and one array of Objects. It also uses a chain of buckets instead of open addressing.) A bientôt, Armin. _______________________________________________ pypy-dev mailing list pypy-dev@python.org https://mail.python.org/mailman/listinfo/pypy-dev