Skip to content

Improve matrix creation performance #69

Description

@GregorySchwartz

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

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions