fibonacci series what Iam is missing ?

CHIN Dihedral dihedral88888 at gmail.com
Mon Mar 23 14:39:05 EDT 2015


On Tuesday, March 24, 2015 at 1:00:11 AM UTC+8, Chris Angelico wrote:
> On Tue, Mar 24, 2015 at 3:16 AM, Dave Angel <davea at davea.name> wrote:
> > An entirely separate question is whether you can gain performance by caching
> > intermediate values.  For example, if you capture values in a list, you
> > could potentially save a lot of time, at least for non-trivial values of n.
> 
> If you take a step back and seek to print a sequence of Fibonacci
> numbers, rather than calculating specific ones based on their indices,
> then you don't even need to consider caching. As soon as you've
> printed out a number, you move right along.
> 
> ChrisA

Well, the good part is that the python version can compute the right
result for a  much larger n in 
fib(n). 



More information about the Python-list mailing list