adklfjawemfkl

JavaScript performance comparison

Revision 11 of this test case created

Preparation code

 
<script>
Benchmark.prototype.setup = function() {
    function test(a,b,c,d,e) {
        return {
            a: Math.random() * a,
            b: Math.random() * b,
            c: Math.random() * c,
            d: Math.random() * d,
            e: Math.random() * e
        };
    }
       
    var arr = [Math.random(), Math.random(), Math.random(), Math.random(), Math.random()];
};

Benchmark.prototype.teardown = function() {
    arr = [Math.random(), Math.random(), Math.random(), Math.random(), Math.random()]
};
</script>

Test runner

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

Java applet disabled.

Testing in unknown unknown
Test Ops/sec
d
test.apply(this, arr);
pending…
dd
test(arr[0], arr[1], arr[2], arr[3], arr[4]);
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:

0 comments

Add a comment