Improving the benchmark algorithms for reducing the memory usage.