Euler problem 1

JavaScript performance comparison

Test case created

Test runner

Warning! For accurate results, please disable Firebug before running the tests. (Why?)

Java applet disabled.

Testing in unknown unknown
Test Ops/sec
Linear
var answer = 0; for(var i = 0; i < 1000; i++) { if((i % 3) === 0 || (i % 5 === 0)) answer += i; };
 
pending…
Parallel
// Find the sum of all the multiples of 3 or 5 below 1000.
var answer = 0;

for(var i = 0; i < 1000; i += 3) {
    if(i % 5 !== 0) answer += i;
}

for(var i = 0; i < 1000; i += 5) {
    answer += i;
}
pending…

You can edit these tests or add even more tests to this page by appending /edit to the URL.

Compare results of other browsers

0 comments

Add a comment