I am trying to solve Q10 from Project Euler. I am using JavaScript and Sieve of Atkins algorithm to solve the problem. When I run the code on browsers(Safari and FF) the browsers prompts that the script is unresponsive. Even if I let the script to continue I never got the answer. I know there are threads for the same Project Euler problem.
My questions would be:-
1.How far JavaScript is capable to solve such complex mathematical problems for browsers?
2.Is there any other environment where I can I test my JavaScript programs?
Thank you All.
I would have thought as capable as any other - JavaScript implementations have been optimised a lot in recent years thanks to increased used in the web.
You can use either node.js or CScript (a command line version of the Windows Script host - this is supplied as part of Windows).
If I remember my implementation of that question (in Python) was significantly slower than I thought it would be. The chances are the slowness is due to your algorithm rather than the language.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With