Fast optimization algorithms and the cosmological constant