speed improvements to make_gaussian_quantiles