[Haskell-cafe] Data.List.sort, not so good?
aneumann at inf.fu-berlin.de
Mon Dec 29 10:01:49 EST 2008
lately I've been playing around with sorting. I discovered that
Data.List.sort is not as optimized I thought. At least not for random
lists. I think we should consider adding a Data.List.Sort package to
hackage (Similar to Data.List.Split) that offers a wide variety of
I don't consider myself to be a very advanced Haskell programmer, but
I could come up with a Mergesort that beats List.sort, time- and
On my machine List.sort takes ~10 sec, mergeSort 7, qs 4 (compiled
with -O2). List.sort eats too much ram to sort 20.000.000 ints, my
QuickCheck says my implementations are correct.
I suppose List.sort does clever things for nonrandom lists, that I
didn't consider? I had a look at the source, but I couldn't find
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 194 bytes
Desc: Signierter Teil der Nachricht
Url : http://www.haskell.org/pipermail/haskell-cafe/attachments/20081229/7d823d3a/PGP.bin
More information about the Haskell-Cafe