Improving the performance of the truncatable algorithm.