
24 Mar
2010
24 Mar
'10
1:05 a.m.
On 24 March 2010 16:01, 国平张
Hi,
I wrote a type program to compute fibonacci series, if the max value is big, then it becomes very slow. like
take 100 fib
How can I make it faster :-)
Use a better algorithm: http://tinyurl.com/ya3vvye Try doing your code by hand for say "fibo 5" to see why it's so bad (hint: GHC does not do CSE in general). -- Ivan Lazar Miljenovic Ivan.Miljenovic@gmail.com IvanMiljenovic.wordpress.com