Use squared-distances in lieu of Euclidean distances to avoid Math.sqrt().