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

2009-08-31 Thread wren ng thornton
staafmeister wrote: The overhead is a O(1) overhead for the function because it needs to check if a computation has already performed. And the space overhead is not so big because every data object in memory there are a couple of references to be stored in lookup tables. So although there is

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

2009-08-28 Thread staafmeister
Bulat Ziganshin-2 wrote: this graph can share computations in only one way - when you give sharec node a name and use this name twice. for example, the following sum[1..1000] + prod[1..1000] don't share anything, but this let list = [1..1000] in sum list + prod list share the

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

2009-08-28 Thread Bulat Ziganshin
Hello staafmeister, Friday, August 28, 2009, 2:34:07 PM, you wrote: Well in case I call (prod list) again it could lookup the reference and see so it should keep a list of all values ever computed in program, together with their expressions? :) are you like idea of prod[1..10^6] computation