Fast sorting in Haskell
问题 After reading Stack Overflow question Using vectors for performance improvement in Haskell describing a fast in-place quicksort in Haskell, I set myself two goals: Implementing the same algorithm with a median of three to avoid bad performances on pre-sorted vectors; Making a parallel version. Here is the result (some minor pieces have been left for simplicity): import qualified Data.Vector.Unboxed.Mutable as MV import qualified Data.Vector.Generic.Mutable as GM type Vector = MV.IOVector Int