Static Object Methods (v2)

Revision 2 of this benchmark created on


Test runner

Ready to run.

Testing in
TestOps/sec
Separate
var lookup = {a: '1', b: '2', c: '3'};
var x  = [];
for (var i = 0; i < 10000; i++) {
  x[0] = lookup[i];
}
ready
Inline
var lookup = {a: '1', b: '2', c: '3'};
var x  = [];
for (var i = 0; i < 10000; i++) {
  x[0] = ({a: '1', b: '2', c: '3'})[i];
}
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.