Yep, there are lots of tricks you could potentially use to optimize it, but from the numbers you’ve posted so far, doing a distance check here isn’t going to be anywhere close to being a performance bottleneck. I can’t stress enough that you shouldn’t even think about performance issues for something like this until you actually encounter them.