What make function with huge list so slow
Windson Yang
wiwindson at gmail.com
Sun Aug 25 08:30:09 EDT 2019
> Figure out how much memory fib_dp is holding on to right before it returns
> the answer. fib(400000) is a _big_ number! And so is fib(399999), and
> fib(399998), and fib(399997), etc. By the time you're done, you're holding
> on to quite a huge pile of storage here. Depending on how much physical
> memory you have, you much actually be swapping before you're done.
>
> --
> Alan Bawden
> --
>
T
Thank you Alan. You are right! we use too much memeoy to save the answer in
the dp list. Now I get it, thank you so much.
More information about the Python-list
mailing list