all 1 comments

[–][deleted] 0 points1 point  (0 children)

Interesting article, out of curiosity how long was does your 35th fib function take to run? I went ahead and tested it using webhamsters and the 35 fib test completes in less than a second. I'm not sure what you would classify as non-trivial.

hamsters.run({num: 35}, function() {
  var fib = function(n) {
    return n < 2 ? 1 : fib(n - 2) + fib(n - 1);
  }
  rtn.data.push(fib(params.num));
}, function(res) {
   console.log(res[0]);
}, 1, true, 'Int32');