toString() vs join() (v4)

Revision 4 of this benchmark created on


Preparation HTML

<script>
  var array = ['one', 'two', 'three', 'four', 'five', 'six', 'seven', 'height', 'nine', 'ten'];
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
toString()
var string = array.toString();
ready
join()
var string = array.join();
ready
join(",")
var string = array.join(",");
ready
none
var string = 'one'+'two'+'three'+'four'+'five'+'six'+'seven'+'height'+'nine'+'ten';
ready

Revisions

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