Sorting algorithm stat recording