ASI performance

JavaScript performance comparison

Revision 2 of this test case created by Christopher Smithson

Info

Testing whether ASI has a significant performance impact.

Preparation code

<script>

</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
Using ASI
var withASI = function() {
    var a = 1
    var b = 0
    if (a == 0) { b = 1 }
    if (a == 1) { b = 1 }
    if (a == 2) { b = 1 }
    if (a == 3) { b = 1 }
    if (a == 4) { b = 1 }
    if (a == 5) { b = 1 }
    if (a == 6) { b = 1 }
    if (a == 7) { b = 1 }
    if (a == 8) { b = 1 }
    if (a == 9) { b = 1 }
}
pending…
Not using ASI
var withoutASI = function() {
    var a = 1;
    var b = 0;
    if (a == 0) { b = 1; }
    if (a == 1) { b = 1; }
    if (a == 2) { b = 1; }
    if (a == 3) { b = 1; }
    if (a == 4) { b = 1; }
    if (a == 5) { b = 1; }
    if (a == 6) { b = 1; }
    if (a == 7) { b = 1; }
    if (a == 8) { b = 1; }
    if (a == 9) { b = 1; }
}
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