[Haskell-cafe] Incrementially updating an array

Henning Thielemann lemming at henning-thielemann.de
Wed Dec 29 16:10:11 CET 2010


On Wed, 29 Dec 2010, Robert Clausecker wrote:

> Am Mittwoch, den 29.12.2010, 13:29 +0100 schrieb Henning Thielemann:
>>
>> I don't know, I hope it's doing its best. :-) You might compare speed of
>> Array.accum with a manually written foldl with (//).
>
> At a glance onto it's sourcecode it actually does, but there are
> actually other problems now, as my program now runs out of stack space.
> (The list to accumulate contains about 1000000 elements). I guess it's
> all about that the garbage collector can't handle such things very well.

The pure number of 1000000 elements should not be a problem. You may post 
the failing code. I guess it has something to do with:

http://www.haskell.org/haskellwiki/Stack_overflow



More information about the Haskell-Cafe mailing list