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

Improve matrix creation performance #69

Open
GregorySchwartz opened this issue Aug 9, 2019 · 1 comment
Open

Improve matrix creation performance #69

GregorySchwartz opened this issue Aug 9, 2019 · 1 comment

Comments

@GregorySchwartz
Copy link
Contributor

When inputting a very large matrix into my program, the majority of the time spent is reading (attoparsec from matrix-market-attoparsec) and matrix creation (the IntM functions). Is there a way to increase performance in both of these libraries? I see that the matrix creation uses lookup for membership existance and then insert, these can be merged into Data.IntMap.Strict.alter, right? I'm sure there are other ways to improve this performance as well...

COST CENTRE          MODULE                           SRC                                                     %time %alloc

insert               Data.Sparse.Internal.IntM        src/Data/Sparse/Internal/IntM.hs:31:1-46                 24.1   46.8
>>=.\.succ'          Data.Attoparsec.Internal.Types   Data/Attoparsec/Internal/Types.hs:146:13-76              13.1    1.9
>>=.\                Data.Attoparsec.Internal.Types   Data/Attoparsec/Internal/Types.hs:(146,9)-(147,44)       11.2    6.5
lookup               Data.Sparse.Internal.IntM        src/Data/Sparse/Internal/IntM.hs:37:1-35                  6.0    0.9
@GregorySchwartz
Copy link
Contributor Author

Also, not necessarily just for matrix creation, but in general performance I've been having some good identifications of stack usage with this process: http://neilmitchell.blogspot.com/2015/09/detecting-space-leaks.html

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