join_vs_concatenation_in_forloop

JavaScript performance comparison

Revision 2 of this test case created

Test runner

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

Java applet disabled.

Testing in unknown unknown
Test Ops/sec
Test 1
var ls = [];
for (var i =0; i < 100; i++){
   ls.push('cadena de prueba' + i);
}
var s = ls.join();
pending…
Test 2
var s = '';
for (var i =0; i < 100; i++){
   s += 'cadena de prueba' + i;
}
pending…
Test 3
var ls = Array(100);
for (var i =0; i < 100; i++){
   ls[i] = 'cadena de prueba' + i;
}
var s = ls.join();
pending…
Test 4
var s = '';
for (var i =0; i < 100; i++){
   s = s + 'cadena de prueba' + i;
}
pending…

Compare results of other browsers

Revisions

You can edit these tests or add even more tests to this page by appending /edit to the URL. Here’s a list of current revisions for this page:

0 comments

Add a comment