improve straight insertion sort condition judgement