Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sorting massiv arrays #48

Closed
ocramz opened this issue Oct 15, 2018 · 2 comments
Closed

Sorting massiv arrays #48

ocramz opened this issue Oct 15, 2018 · 2 comments

Comments

@ocramz
Copy link
Contributor

ocramz commented Oct 15, 2018

Are there sorting algorithms implemented already for massiv? Thanks!

@lehins
Copy link
Owner

lehins commented Oct 15, 2018

@ocramz Not yet. It's definitely one of many things on my wish list for massiv. Not sure if it would be better to create a separate package massiv-algorithms, that would contain things like sorting, but I am leaning more towards massiv being "batteries included" kind of library.

I'll convert this ticket into a feature request.

@lehins lehins changed the title Q. Sorting massiv arrays? Sorting massiv arrays Oct 15, 2018
@lehins lehins closed this as completed in bc8e9d5 Apr 28, 2019
lehins added a commit that referenced this issue Apr 28, 2019
* Exported `withMArrayS`
* Addition of `readM`, `writeM`, `modifyM` and `swapM`
* Switch to pure exception throwing for `read'`, `write'`, `modify'` and `swap'`
* Addition of `quicksort`, `quicksortM_`, `unstablePartitionRegionM` and
  `unsafeUnstablePartitionRegionM`: FIx #48
@lehins
Copy link
Owner

lehins commented Apr 28, 2019

For now it is only quicksort that is implemented, but it is a start. See related benchmarks in helper repo: https://github.com/lehins/haskell-quicksort as well as related SO answer: https://stackoverflow.com/questions/19752983/is-it-possible-to-speed-up-a-quicksort-with-par-in-haskell/55885118#answer-55885118

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants