Remove gtol parameter.
Optimize performance.