[Haskell-cafe] Program using 500MB RAM to process 5MB file
lucas at die.net.au
lucas at die.net.au
Fri Apr 3 08:32:10 EDT 2009
On Fri, Apr 03, 2009 at 10:27:08PM +1100, lucas at die.net.au wrote:
> On Fri, Apr 03, 2009 at 10:22:07AM +0200, Ketil Malde wrote:
> > lucas at die.net.au writes:
> >
> > > I'm relatively new to haskell so as one does, I am rewriting an
> > > existing program in haskell to help learn the language.
> >
> > > However, it eats up all my RAM whenever I run the program.
> >
>
> Thanks for all the help everyone . I've decided to dump Parsec, as the file
> structure is simple enough to implement using basic list manipulation
> (which is, I've read, one of haskell's strong points) and has turned
> out to be much simpler code.
>
Using lazy I/O has reduced run time by 75% and RAM consumption to 3MB
Thank you :)
--
Lucas Hazel <lucas at die.net.au>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
Url : http://www.haskell.org/pipermail/haskell-cafe/attachments/20090403/512defac/attachment.bin
More information about the Haskell-Cafe
mailing list