Switching to a faster algorithm