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

Bulat Ziganshin bulat.ziganshin at gmail.com
Fri Aug 28 07:23:01 EDT 2009


Hello staafmeister,

Friday, August 28, 2009, 3:03:13 PM, you wrote:
>> 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 taking 10 mbytes of memory?

> The list you give prod is also 10 MB so it not a terribly inefficient
> program.

no, it's produced on need so it needs O(1) memory

> It's a factor of 2. Well haskell also has often a factor of 2 overhead with
> respect to C and people are not terribl concerned about that

factor of 2 compared to ALL VALUES ever produced when evaluating
program. since computer performs about 10^9 computations per second,
you are going to store 10^9 values each second, some of those may be
multi-megabyte by itself



-- 
Best regards,
 Bulat                            mailto:Bulat.Ziganshin at gmail.com



More information about the Haskell-Cafe mailing list