Optimised algorithms and set to run for time instead of iterations