Machine Learning, NLP, Artificial Intelligence, Machine Intelligence, Tutorial.
fib_cache[x] = result return result startTime = time.time() print("%-14s:%d" % ("Result",fib(32))) print("%-14s:%.4f seconds" % ("Elapsed time",time.time() - startTime)) Result :2178309 Elapsed time :0.0007 seconds Notice the significant improvement in performance when we move to dynamic