title: Are recursive functions slower than their non recursive counterpart
body: <p>I have used a recursive function for factorial of a number and Fibonacci series (Done in C++) and I have found that the recursive function about factorial runs just normal as expected and execution speeds do not differ greatly.</p>
  
  <p>However on the Fibonacci one it is decisively slow. Why is it so ?</p>
  
  <p>Recursive approach:</p>
  
  <pre><code>unsigned long int fib_num(int n)  //This is My code
  {
      switch (n)
      {
      case 1:
          return 0;
          break;
      case 2:
          return 1;
          break;
      default:
          return fib_num(n - 1) + fib_num(n - 2);
          break;
      }
  }
  </code></pre>
  
  <p>Iterative approach:</p>
  
  <pre><code>first = 0;
  second = 1
  
  for(i = 0; i &lt; num; i++)   
  {
      cout&lt;&lt;"\n"&lt;&lt;first;
  
      next = first + second;
  
      first = second;
      second = next;
  }
  </code></pre>