Optimizing the reduction of one-loop amplitudes