Skip to content Skip to sidebar Skip to footer

Javascript For Project Euler Problems

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 p

Solution 1:

  1. 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.

  2. 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.

Solution 2:

You could try testing your implementation on node.js.

However, I would bet that you have a problem with your code. JavaScript in a modern browser is pretty quick (and generally you should get Project Euler answers very quickly; it's not designed to require high amounts of computing power).

Post a Comment for "Javascript For Project Euler Problems"