serokell / universum

:milky_way: Prelude written in @Serokell
MIT License
176 stars 28 forks source link

Faster merge sort #112

Closed chshersh closed 6 years ago

chshersh commented 6 years ago

It's claimed that this implementation of merge sort based on mutable arrays is faster than standard sort from base package:

I guess this can be investigated.

johnchandlerburnham commented 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

chshersh commented 6 years ago

@johnchandlerburnham No, there's no such library, AFAIK. Sorting algorithms are not really researched well in pure immutable Haskell setting...

rpglover64 commented 6 years ago

There's this: https://hackage.haskell.org/package/vector-algorithms

chshersh commented 6 years ago

@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.