+ vs string.concat (v5)

Revision 5 of this benchmark created by Craig on


Preparation HTML

Added test cases for when the variables being combined are not both strings (but when the result will be a string due to implicit conversion)
<script>
  var str = '',
      hello = 'Hello ',
      world = 'World ',
      two = '22222 ',
      three = 33333;
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
add
str = hello + world;
ready
concat
str = hello.concat(world);
ready
add (different types)
str = two + three;
ready
concat (different types)
str = two.concat(three);
ready

Revisions

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