Re:Python dicts are now ordered
by TheFlyingFish on Friday February 07, 2020 @02:09PM
(#22269553)
It actually improves performance. Or at least, it comes along with a set of performance improvements that give you ordering for free. Raymond Hettinger has a great talk on it: https://www.youtube.com/watch?v=npw4s1QTmPg&t=1s
Using OrderedDict is actually nice in this case, even if the default dict has the same ordering. That way you're explicitly saying you rely on that behaviour and it makes reading the code easier.
That said, I have no idea about the internals of dict. I assume no performance was sacrificed for this change.