dot notation vs bracket notation

Benchmark created on


Preparation HTML

<script>
  var structure = {
    a: '1',
    b: '2',
    c: '3',
    d: '4',
    e: '6',
    f: '7',
    g: '8'
  };
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
dot notation
structure.a == 1;
structure.b == 2;
structure.c == 3;
structure.d == 4;
structure.e == 5;
structure.f == 6;
structure.g == 7;
ready
bracket notation
structure['a'] == 1;
structure['b'] == 2;
structure['c'] == 3;
structure['d'] == 4;
structure['e'] == 5;
structure['f'] == 6;
structure['g'] == 7;
ready

Revisions

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