A comparison of Bayesian sampling algorithms for high-dimensional particle physics and cosmology applications