title: Why it takes a long time to compute Fibonacci number?
body: <p>I started learning Ocaml a few days ago. I tried to make a program of fibonaaci numbers:</p>
  
  <pre><code>  let rec fib a=
        if a=1||a=2 then 1 else fib(a-1)+fib(a-2);;
  </code></pre>
  
  <p>This code is not optimal as I do not know how to deal with exception cases. But for now, if I try to compute fib 50 or fib 100, then the computer takes a long time to evaluate. I am wondering why, because Ocaml is supposed to be very fast, and adding numbers up is obviously a linear time task. If I paste this code in "Try Ocaml" (<a href="http://try.ocamlpro.com/" rel="nofollow">http://try.ocamlpro.com/</a>), then the whole website freezes when I execute fib 50. </p>
  
  <p>Sorry if the level of the question is too low. </p>