dot vs. subscription

Benchmark created on


Preparation HTML

<script>
  var test = "fooooooooooooooooooooooooooooooooooooooo";
  var e = '', s = 'substring', l = 'length';
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
DOT
e = test.substring(0, 5);
e = '';
ready
SUB
e = test[s](0, 5);
e = '';
 
ready
DOT2
e = test.length;
e = '';
ready
SUB2
e = test[l];
e = '';
ready

Revisions

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