Which parallel sorting algorithm has the best average case performance?

Posted by Craig P. Motlin on Stack Overflow See other posts from Stack Overflow or by Craig P. Motlin
Published on 2010-10-19T15:07:32Z Indexed on 2011/01/15 22:53 UTC
Read the original article Hit count: 153

Filed under:
|
|

Sorting takes O(n log n) in the serial case. If we have O(n) processors we would hope for a linear speedup. O(log n) parallel algorithms exist but they have a very high constant. They also aren't applicable on commodity hardware which doesn't have anywhere near O(n) processors. With p processors, reasonable algorithms should take O(n/p log n/p) time.

In the serial case, quick sort has the best runtime complexity on average. A parallel quick sort algorithm is easy to implement (see here and here). However it doesn't perform well since the very first step is to partition the whole collection on a single core. I have found information on many parallel sort algorithms but so far I have not seen anything pointing to a clear winner.

I'm looking to sort lists of 1 million to 100 million elements in a JVM language running on 8 to 32 cores.

© Stack Overflow or respective owner

Related posts about algorithm

Related posts about sorting