Sept. 1, 2020
9:22 a.m.
I believe I described my case poorly, the process to get from one state (key) to the next is an external (slow) process; the value stored is not the next state but a value calculated while advancing the state. This dict serves as a way to quickly skip steps of the external process when it has repeated itself, and thus calculating the next key would be exorbitantly slower than iterating through the whole dict. In any case as a poster pointed out above, my example is not as compelling in terms of a speedup as I thought, the dict key iteration is not very long in practice compared to other operations I need to do.