While selection sort is preferable to insertion sort in terms of number of writes ( ? ( " n " ) swaps versus ? ( " n " 2 ) swaps ), it almost always far exceeds ( and never beats ) the number of writes that cycle sort makes, as cycle sort is theoretically optimal in the number of writes.