String concatenation (v67)

Revision 67 of this benchmark created by Rafael Soares on


Description

Different ways to concatenate strings together

Setup

var toto = "0123456789";

Teardown


    var toto = undefined;
    var titi = undefined;
  

Test runner

Ready to run.

Testing in
TestOps/sec
Direct concatenation
var titi = "";
for(var i=0; i<100000; i++){
  titi+=toto;
}
ready
Array join
var titi = [];
for(var i=0; i<100000; i++){
  titi.push(toto);
}
titi.join('');
ready
Concat Method
var titi = "";
for(var i=0; i<100000; i++){
  titi.concat(toto);
}
ready

Revisions

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