Basic optimize. Use Iterator[SplitMetric] instead Array[SplitMetric] to save some running time.