Access Key Value

JavaScript performance comparison

Revision 2 of this test case created

Test runner

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

Java applet disabled.

Testing in unknown unknown
Test Ops/sec
Multiple Arrays
var a1 = ['a', 'b', 'c'],
    a2 = [1, 2, 3];

a2[a1.indexOf('a')];
pending…
Object
var obj = {
  a: 1,
  b: 2,
  c: 3
};

obj.a;
pending…
Nested Array
var a1 = [
  ['a', 'b', 'c'],
  [1, 2, 3]
];

a1[a1[0].indexOf('a')];
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