Re[Haskell-cafe] [2]: Re[2]: Reduction Sequence of simple Fibonacci sequence implementation

staafmeister g.c.stavenga at uu.nl
Fri Aug 28 07:23:41 EDT 2009




david48 wrote:
> 
> On Fri, Aug 28, 2009 at 1:03 PM, staafmeister<g.c.stavenga at uu.nl> wrote:
> 
> 
>> The list you give prod is also 10 MB so it not a terribly inefficient
>> program.
> 
> That list takes memory only if it is forced. If it is passed to a lazy
> function, all the list may not be in memory at once.
> 

In that case the GC cleaned up the whole list and while cleaning up it
should also clean up the references in the cache lookup table. So then 
there is no space overhead either. 

-- 
View this message in context: http://www.nabble.com/Reduction-Sequence-of-simple-Fibonacci-sequence-implementation-tp25178377p25188238.html
Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.



More information about the Haskell-Cafe mailing list