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
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 useslookupfor membership existance and theninsert, these can be merged intoData.IntMap.Strict.alter, right? I'm sure there are other ways to improve this performance as well...