mapper walls

JavaScript performance comparison

Test case created

Preparation code

<p>from <input id="a" value="0"> to <input id="b" value="10000"> 
<textarea id="c" cols="120" rows="30"></textarea>

Preparation code output

from to

Test runner

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

Java applet disabled.

Testing in unknown unknown
Test Ops/sec
1
    var a = document.getElementById("a").value,
        b = document.getElementById("b").value,
        c = document.getElementById("c"),
        d = "";

    for (i = a; i <= b; i++) {
        d += i + " ";
    }
    c.innerHTML = d;
pending…
2
    var a = document.getElementById("a").value,
        b = document.getElementById("b").value,
        c = document.getElementById("c");
        if(b >= a)
        {
                var arr = new Array(b - a + 1);
                var i = 0;
                while(a <= b) arr[i++] = a++;
                c.innerHTML = arr.join(' ');
        }
pending…

Compare results of other browsers

Revisions

You can edit these tests or add even more tests to this page by appending /edit to the URL. Here’s a list of current revisions for this page:

1 comment

B commented :

Some small test

Add a comment