Array by String or by num

JavaScript performance comparison

Test case created

Info

Test

Test runner

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

Java applet disabled.

Testing in unknown unknown
Test Ops/sec
str
var toto = [];
toto["a"] = 1;
toto["b"] = 1;
toto["c"] = 1;
toto["d"] = 1;
toto["e"] = 1;
toto["f"] = 1;
var i = toto["e"];
pending…
int
var a = 0;
var b = 1;
var c = 2;
var d = 3;
var e = 4;
var f = 5;
var toto = [];
toto[a] = 1;
toto[b] = 1;
toto[c] = 1;
toto[d] = 1;
toto[e] = 1;
toto[f] = 1;
var i = toto[e];
 
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