Several lookup tables function as such:
{x1:[y1,y2,y3,y4], x2[y1,y2,y3,y4] ....} for identifying if X,Y have been already looked at (or for other general storage).
It will likely be faster if we engage in sneakiness and have a hash of a hash like so:
{x1:{y1:True, y2:True, y3:True}, x2:{y1:True, y2:True} ...} that way its 2 O1 operations instead of an O1, On operation.
Several lookup tables function as such: {x1:[y1,y2,y3,y4], x2[y1,y2,y3,y4] ....} for identifying if X,Y have been already looked at (or for other general storage).
It will likely be faster if we engage in sneakiness and have a hash of a hash like so: {x1:{y1:True, y2:True, y3:True}, x2:{y1:True, y2:True} ...} that way its 2 O1 operations instead of an O1, On operation.