PERF: Improve index.min and max perf
modified