Dictionaries are ordered in Python 3.6

Essentially by keeping two arrays, one holding the entries for the dictionary in the order that they were inserted and the other holding a list of indices.

In the previous implementation a sparse array of type dictionary entries had to be allocated; unfortunately, it also resulted in a lot of empty space since that array was not allowed to be more than 2/3s full. This is not the case now since only the required entries are stored and a sparse array of type integer2/3s full is kept.

Obviously creating a sparse array of type “dictionary entries” is much more memory demanding than a sparse array for storing ints (sized 8 bytes tops in cases of really large dictionaries)

As you can visually now see, in the original proposal, a lot of space is essentially empty to reduce collisions and make look-ups faster. With the new approach, you reduce the memory required by moving the sparseness where it’s really required, in the indices.

Should you depend on it and/or use it?

As noted in the documentation, this is considered an implementation detail meaning it is subject to change and you shouldn’t depend on it.

If you want to write code that preserves the ordering and want it to not break on previous versions/different implementations you should always use OrderedDict. Besides, OrderedDict will most likely eventually become a thin-wrapper around the new dict implementation.