-
Notifications
You must be signed in to change notification settings - Fork 1.7k
The example Fibonacci is not responsive most of the times #23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This comment was originally written by kand...@gmail.com Fibonacci grows exponentially as a geometric power, the difference between 30 and 50 is orders of magnitude, and thus of course you don't see the result because it takes a very long time to compute. Try learning how to open the Task Manager and checking the CPU usage or write a print statement to find out what fibonacci you are on. |
This comment was originally written by drfibonacci@google.com Um, yes, the example code is the recursive algorithm, which blows up quickly for n>35. In fact, Google App Engine system status page uses this algorithm as a compact way to tax the CPU for measurement purposes. Personally, the example bothers me because it's too verbose. With Dart, you can easily compute the nth Fibonacci # in exactly 34 characters (granted, spacing is a bit arbitrary): f(n) => n<2 ? n : f(n-2) + f(n-1); Added Invalid label. |
This issue was originally filed by guilhermeorti...@gmail.com
What steps will reproduce the problem?
What is the expected output? What do you see instead?
I was expecting a numeric output generated by the function. Instead, the page freezes or crashes.
What version of the product are you using? On what operating system?
n/a. Google Chrome on Windows 7
Please provide any additional information below.
The text was updated successfully, but these errors were encountered: