<p>The algorithms you described for computing the <em>n</em>-th Fibonacci number are not the fastest. The fastest possible algorithms (for large <em>n</em>) are based on different recursive formulations. Since you are probably not interested to the theoretical details underlying the algorithms, here is, for your reference, a "practical" paper discussing the Python implementation of 12 different algorithms. These algorithms are compared against each other for different ranges of <em>n</em>, and the results are discussed. You will see that, depending on the value of <em>n</em>, the best algorithm changes.</p>

<p><a href="https://arxiv.org/pdf/1803.07199.pdf" rel="nofollow noreferrer">Twelve Simple Algorithms to Compute Fibonacci Numbers</a></p>
Why is the performance time graph of the Fibonacci function not smooth?
<p>There are two functions that implement Fibonacci sequence. <code>fibo()</code> was recursive style, and <code>iterfibo()</code> was implemented using a circular method.
I compared the performance time of the two functions. </p>

<pre><code>import matplotlib.pyplot as plt
import time

# iteration style
def iterfibo(count):
    if count &lt;= 1 :
        return count

    left, right = 0, 1

    for i in range(count - 1):
        temp = left + right
        left = right
        right = temp

    return temp

# recursion style
def fibo(n):
    if n &lt;= 1:
        return n
    return fibo(n - 1) + fibo(n - 2)

length = [x for x in range(25)]

iterfibo_time = []
fibo_time = []

for i in length:
    # fibo's execution time
    ts = time.time()
    fibo(i)
    fibo_time.append(time.time() - ts)

    # iterfibo's execution time
    ts = time.time()
    iterfibo(i)
    iterfibo_time.append(time.time() - ts)

plt.plot(length, iterfibo_time)
plt.show()
</code></pre>

<p>However, I was wondering that the graph of <code>iterfibo()</code> was not a smooth curve. And in some cases, the performance time was reduced, not increased.</p>

<p><code>fibo()</code> (recursive) time:
<img src="https://i.stack.imgur.com/McBmH.png" alt="fibo_time.png"></p>

<p><code>iterfibo()</code> (iterative) time:
<img src="https://i.stack.imgur.com/V0mYz.png" alt="iterfibo_time.png"></p>

<p>So I wonder why the graph takes this form.</p>