Hello Haskell-Cafe,
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
From: haskell-cafe-boun...@haskell.org
[mailto:haskell-cafe-boun...@haskell.org] On Behalf Of Adrian Neumann
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
spacewise.
http://hpaste.org/13403
Ah that's interesting. Now my Mergesort is exactly as fast as
List.sort. I thought GHC was smart enough to do that kind of inter-
module optimisation.
Still, Quicksort is twice as fast, so at least one argument for a
Data.List.Sort package on hackage remains.
Am 29.12.2008 um 16:43
I think you are repeating my steps :-) On sorted data (like [1..n])
quicksort is O(n^2).
Please read this thread:
http://www.nabble.com/(flawed-)-benchmark-:-sort-td15817832.html
All best
Christopher Skrzętnicki
2008/12/29 Adrian Neumann aneum...@inf.fu-berlin.de:
Ah that's interesting. Now