I have a script that makes many calls to a dictionary using a key consisting of two variables. I know that my program will encounter the two variables again in the reverse order which makes storing the key as a tuple feasible. (Creating a matrix with the same labels for rows and columns)
Therefore, I was wondering if there was a performance difference in using a tuple over a frozenset for a dictionary key.
In a quick test, apparently it makes a negligible difference.
I really would just go with what is best elsewhere in your code.