Optimize Segmenter::optimize_segment()