That's a good point. Depending on usage and distribution, short-circuiting on "exists $cells[$x]" could also improve speed. In fact, knowing more about the distribution, organising the matrix as "$cells[$y][$x]", instead of "$cells[$x][$y]", could be another improvement.
— Ken
In reply to Re^3: Fastest way to lookup a point in a set
by kcott
in thread Fastest way to lookup a point in a set
by eyepopslikeamosquito
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |