bracket_vs_dot big get

JavaScript performance comparison

Revision 2 of this test case created

Preparation code

 
<script>
Benchmark.prototype.setup = function() {
    var a = {};
    (function () {
        for ( var i = 0; i < 1000000; i++ )
            a[ "q" + i ] = "" + (i * 5);
    })();
};
</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
bracket example
a["q1"] = a["q13433"];
a["q2"] = a["q343"];
a["q3"] = a["q655"];
a["q4"] = a["q565656"];
a["q5"] = a["q7878777"];
a["q6"] = a["q167676"];
a["q7"] = a["q973433"];
a["q8"] = a["q6673"];
a["q9"] = a["q19"];
a["q10"] = a["q2637663"];
pending…
dot example
a.q1=a.q13433;
a.q2=a.q343;
a.q3=a.q655;
a.q4=a.q565656;
a.q5=a.q7878777;
a.q6=a.q167676;
a.q7=a.q973433;
a.q8=a.q6673;
a.q9=a.q19;
a.q10=a.q2637663;

 
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