Fibonnaci sequence calculation
The key difference is in a technic called "memoization". According to Wikipedia:
In computing, memoization or memoisation is an optimization technique used primarily to speed up computer programs by storing the results of expensive function calls and returning the cached result when the same inputs occur again.
So basically, in the first function, you save all the previous results while on the second function you need to calculate everything again from the beginning for every new call.
A quick search on the internet gives this tutorial if you wish to learn more.