Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
String Concatenation between string append, push & join and assign & join
(version: 0)
Comparing performance of:
standard string append vs array push then join vs array index assign then join
Created:
3 years ago
by:
Guest
Jump to the latest result
Script Preparation code:
var str1 = "", str2 = "", str3 = "", sArr1 = [], sArr2 = new Array(500);
Tests:
standard string append
for (var i = 0; i < 500; i++) { str1 += "String concatenation. "; }
array push then join
for (var i = 0; i < 500; i++) { sArr1.push("String concatenation. "); } str2 = sArr1.join("");
array index assign then join
for (var i = 0; i < 500; i++) { sArr2[i] = "String concatenation. "; } str3 = sArr2.join("");
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (3)
Previous results
Fork
Test case name
Result
standard string append
array push then join
array index assign then join
Fastest:
N/A
Slowest:
N/A
Latest run results:
No previous run results
This benchmark does not have any results yet. Be the first one
to run it!
Related benchmarks:
String Concatenation
String concatenation vs array join Performance:3
String concatenation vs array join precise
String concatenation vs array join v6
Comments
Confirm delete:
Do you really want to delete benchmark?