Eliminate deep recursion when speed is infinite.