Comment Comment by quelltext > and I can't explain exactly how their ordered dicts workTraditionally you simply use a doubly linked list approach on the entries (each entry maintains two additional references to the previous and next entry) for that like LinkedHashMap: https://docs.oracle.com/javase//8/docs/api/java/util/LinkedH...https://github.com/openjdk-mirror/jdk7u-jdk/blob/master/src/...Which is also what Python seems to be doing: https://stackoverflow.com/a/34496644It's fairly intuitive.Do their new default (now also ordered?) dics do this differently? parent quelltext 2 years ago
Traditionally you simply use a doubly linked list approach on the entries (each entry maintains two additional references to the previous and next entry) for that like LinkedHashMap: https://docs.oracle.com/javase//8/docs/api/java/util/LinkedH...
https://github.com/openjdk-mirror/jdk7u-jdk/blob/master/src/...
Which is also what Python seems to be doing: https://stackoverflow.com/a/34496644
It's fairly intuitive.
Do their new default (now also ordered?) dics do this differently?