str vs array

Benchmark created by Amatewasu on


Preparation HTML

<script>
  var strShort = "0";
  var arrayShort = [0];
  
  var strLong = "0123456789";
  var arrayLong = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
str (short)
strShort[0];
ready
str (long)
strLong[10];
ready
array (short)
arrayShort[0];
ready
array (long)
arrayLong[10];
ready

Revisions

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

  • Revision 1: published by Amatewasu on