String concatenation (v66)

Revision 66 of this benchmark created on


Description

Different ways to concatenate strings together

Test runner

Ready to run.

Testing in
TestOps/sec
Direct concatenation
var toto = "0123456789";
var titi = "";
for(var i=0; i<100000; i++){
  titi+=toto;
}
ready
Array join
var toto = "0123456789";
var titi = [];
for(var i=0; i<100000; i++){
  titi.push(toto);
}
titi = titi.join('');
ready
Direct concatenation
var toto = "0123456789";
var titi = "";
for(var i=0; i<100000; i++){
  titi+=toto;
}
ready
Concat Method
var toto = "0123456789";
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.