string literals for object keys vs standard object notation

Benchmark created by Anatol on


Test runner

Ready to run.

Testing in
TestOps/sec
standard object
var obj = {
  foo: 'bar',
  baz: 1234,
  bad: {
    ass: function() {
      return true;
    }
  }
}
ready
string literal keys
var obj = {
  'foo': 'bar',
  'baz': 1234,
  'bad': {
    'ass': function() {
      return true;
    }
  }
}
ready

Revisions

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

  • Revision 1: published by Anatol on