concat/join-with-push/join-without-push

JavaScript performance comparison

Revision 189 of this test case created by Vladimir Liubimov

Test runner

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

Java applet disabled.

Testing in CCBot 2.0.0 / Other 0.0.0
Test Ops/sec
join-without-push
for (var res = [], i = 0; i < 10000; i++) {
 res[i] = 'a';
}
res = res.join('');
pending…
join-with-push
for (var res = [], i = 0; i < 10000; i++) {
 res.push('a');
}
res = res.join('');
pending…
join-without-push preallocated array
for (var res = new Array(10000), i = 0; i < 10000; i++) {
 res[i] = 'a';
}
res = res.join('');
pending…
concat
for (var res = '', i = 0; i < 10000; i++) {
 res += 'a';
}
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.

0 Comments