I was working on implementing a quicksort yesterday, and then I ran it, expecting a faster runtime than the Mergesort (which I had also implemented). I ran the two, and while th
I could imagine that by directly accessing the memory, using C for example, one can improve the performance of Quicksort more than it is possible with Mergesort.
Another reason is that Mergesort needs more memory because it's hard to implement it as an in-place sort.
And specifically for your implementation you could improve the choosing of the pivot, there are a lot of different algorithms to find a good pivot.
As can be seen on wikipedia, one can implement Quicksort in different ways.