Improved performance of toListSegment. Increased accuracy of benchmarks.