SpiNNakerManchester / PACMAN

Partition and Configuration Manager for SpiNNaker
Apache License 2.0
9 stars 7 forks source link

No need for "Ordered" dict #425

Closed Christian-B closed 2 years ago

Christian-B commented 2 years ago

As of python 3.7 (the first version we officially support) all dicts are now order guaranteed. Even python 3.6 had it just not made if a guarantee

The OrderedDict and our DefaultOrderedDict have a few minor advantages such as ability to iterate reversed. (python 3.8 normal dicts can but not 3.7 or 3.6) Ability to .move_to_end() In normal dicts you have to remove and readded to get that affects But are about 30% slower and do use more ram ref: https://realpython.com/python-ordereddict/

This set of PRs changes the "ordered" to normal as far as possible.

They are all independent except that this PACMAN one must be done before (or at the same time as) the utils one!

OrderDict was kept in SpinUtils Ordered Sets as that supports reverse.

SpallocServer not done as 1. it uses move_to_end and 2 is actively being replaced with a Java version.

tested by:

TODO!