[Haskell-beginners] what to do about excess memory usage
Chaddaï Fouché
chaddai.fouche at gmail.com
Thu Jun 27 18:23:25 CEST 2013
First 2MB isn't a lot of RAM nowadays, do you mean 2GB or is that just
compared to the rest of the program ?
Second, your powersOfTen should probably be :
> powersOfTen = iterate (10*) 1
Or maybe even a Vector (if you can guess the maximum value asked of it) or
a MemoTrie (if you can't) since list indexing is slow as hell.
That could help with memoPair which should definitely be a Vector and not a
list.
Good luck (on the other hand, maybe your program is already "good enough"
and you could just switch to another project)
--
Jedai
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/beginners/attachments/20130627/f2da75ff/attachment.htm>
More information about the Beginners
mailing list