String concat / array join

JavaScript performance comparison

Test case created by david

Test runner

Warning! For accurate results, please disable Firebug before running the tests. (Why?)

Java applet disabled.

Testing in unknown unknown
Test Ops/sec
Array join
var str = "i am a string";
var i = 0;
var str_join = [];

while (i++ < 10000) {
  str_join.push(str);
}

var str_concat = str_join.join('');
pending…
String Concat
var str = "i am a string";
var i = 0;
var str_concat = '';

while (i++ < 10000) {
  str_concat += str;
}
pending…

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

Compare results of other browsers

0 comments

Add a comment