v7
v7 copied to clipboard
Recursive function slowdown
I have noticed that V7 performance takes a dive when doing recursive function calls. Try this Fibonacci example to see what I mean. Fibonacci(32) should allow you to have lunch before completion. :-(
function fibonacci(n) {
if (n <= 2) {
return 1;
} else {
return fibonacci(n - 1) + fibonacci(n - 2);
}
}
print(fibonacci(24));