« Return to Thread: Why does this program eat RAM?

Re: Why does this program eat RAM?

by John Goerzen-3 :: Rate this Message:

Reply to Author | View in Thread

On 2006-09-05, Udo Stenzel <u.stenzel@...> wrote:
> The culprit is insertWith, it inserts unevaluated thunks into your map

This turned out to be the answer -- thanks!

I posted a new version of the code here:

http://changelog.complete.org/posts/536-Another-Haskell-Solution-to-Lars-Problem.html

This particular test set was a few hundred copies of the GPL.  So the
Map was fairly small, since each word occured many, many times -- but
there weren't a whole lot of words.  So the problem was not the
inefficiency of Data.Map, nor the inefficiency of Strings (though that
inefficiency does explain why the Python solution is faster, I'm sure).

-- John


_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@...
http://www.haskell.org/mailman/listinfo/haskell-cafe

 « Return to Thread: Why does this program eat RAM?