new array vs literal (v2)

Revision 2 of this benchmark created by Krystian on


Preparation HTML

<script>
  var p1 = new Array("1
  ", "2", "3");
  var p2 = ["1", "2", "3"];
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
new Array
var arr1 = p1[3];
ready
[]
var arr2 = p2[3];
ready

Revisions

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