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

Use unboxed array for the main matrix #11

Closed
huffyhenry opened this issue Dec 1, 2018 · 5 comments
Closed

Use unboxed array for the main matrix #11

huffyhenry opened this issue Dec 1, 2018 · 5 comments
Assignees
Labels
high priority Things to do before doing other things
Milestone

Comments

@huffyhenry
Copy link
Owner

No description provided.

@huffyhenry huffyhenry added the bug Something isn't working label Dec 1, 2018
@huffyhenry huffyhenry self-assigned this Dec 1, 2018
@huffyhenry
Copy link
Owner Author

See https://stackoverflow.com/questions/32123475/profiling-builds-with-stack for instructions how to profile with stack and https://making.pusher.com/memory-profiling-in-haskell/ for an example.

@huffyhenry
Copy link
Owner Author

@huffyhenry
Copy link
Owner Author

@huffyhenry huffyhenry added high priority Things to do before doing other things and removed bug Something isn't working labels Dec 22, 2018
@huffyhenry huffyhenry changed the title Fix apparent memory leak in NW.align Use unboxed array for the main matrix Dec 22, 2018
@huffyhenry
Copy link
Owner Author

The cause of the high memory footprint is "boxing": as I understand it, Haskell keeps the full computation of the array entries instead of the final value. Use unboxed arrays instead. Things to keep in mind:

  • Only simple types can be held in unboxed arrays, how do we keep an Entry? Do we need two arrays here?
  • We need to define the entries in the correct order - not hard, since N-W arrays can be filled row by row.

@huffyhenry huffyhenry added this to the First release milestone Dec 22, 2018
@huffyhenry
Copy link
Owner Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
high priority Things to do before doing other things
Projects
None yet
Development

No branches or pull requests

1 participant