More memory efficient binning distance.