Lazily evaluates components of Euclidean distance, accelerating distance-thresholding when dimensionality exceeds 20.