Closed chshersh closed 6 years ago
Is there a good Haskell library with a collection of different sorting algorithms? Something with a good timsort or blocksort implementation maybe?
I can't find anything that looks well-used: https://hackage.haskell.org/packages/search?terms=sort
@johnchandlerburnham No, there's no such library, AFAIK. Sorting algorithms are not really researched well in pure immutable Haskell setting...
There's this: https://hackage.haskell.org/package/vector-algorithms
@rpglover64 Nice! Thanks for suggestion. I don't think this should be included in custom prelude. And I also don't think that we should introduce any other functions for this. Reexporting standard sorting algorithms is already fine! But still good to know about vector-algorithms
library.
It's claimed that this implementation of merge sort based on mutable arrays is faster than standard
sort
frombase
package:I guess this can be investigated.