Numerical simulations of lattice quantum field theories whose continuum counterparts possess classical solutions with nontrivial topology face a severe critical slowing down as the continuum limit is approached. Standard Monte Carlo algorithms develop a loss of ergodicity, with the system remaining frozen in configurations with fixed topology. We analyze the problem in a simple toy model, consisting of the path integral formulation of a quantum mechanical particle constrained to move on a circumference. More specifically, we implement for this toy model various techniques which have been proposed to solve or alleviate the problem for more complex systems, like non-Abelian gauge theories, and compare them both in the regime of low temperature and in that of very high temperature. Among the various techniques, we propose an alternative algorithm which completely solves the freezing problem, but unfortunately is specifically tailored for this particular model and not easily exportable to more complex systems.