benchmarking the mass_dist function