Nothing weird about this ...
The difference will become larger as your input value becomes larger.

You can easily understand why if you try to calculate fib(10) by hand,
i.e. work through the algorithm with pencil and paper,
then compare the work you have to do to the memoized version which just takes fib(9) and fib(8) from memory and adds them together.

Best regards,
Stefaan.
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to