2012-05-02, 03:39 AM
This is because of your choice of array to be sorted. You're using random numbers less than 1000 to fill your 6 million size array. This is going result in a lot of ties, which is quick sort's worst case situation.
If you change the RNG.nextInt(1000) to RNG.nextInt(size), you will see quick sort being faster than merge sort.
If you change the RNG.nextInt(1000) to RNG.nextInt(size), you will see quick sort being faster than merge sort.

