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.
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at
https://mail.python.org/archives/list/python-ideas@python.org/message/GZIIFVMRQDQLPNCZAYM4HHZ3HAHGXD2H/
Code of Conduct: http://python.org/psf/codeofconduct/