title: How do you test speed of sorting algorithm?
body: <p>I want to do an empirical test on the speed of sorting algorithms. Initially I randomly generated data but this seems to be unfair and mess up some algorithms. For example with quicksort the pivot selection is important and one method of picking the pivot is to always pick the first and another method is to pick the median of the first, last, and middle elements. But if the array is already random it doesn't matter which pivot is selected, so in this sense it's unfair. How do you resolve this?</p>
  
  <p>Where can I get real world samples for testing sorting algorithms? I've heard in real scenarios data is often partially sorted, but how is this information used in a sorting algorithm?</p>