Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Array to string conversion with vs without join
(version: 1)
Comparing performance of:
Array to string with join vs Array to string without join
Created:
11 months ago
by:
Guest
Jump to the latest result
Script Preparation code:
var str = ""; var i; var sArr = []; for (i = 1000; i > 0; i--) { sArr.push("String concatenation. "); }
Tests:
Array to string with join
str = 'asdf' + sArr.join();
Array to string without join
str = 'asdf' + sArr;
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
Array to string with join
Array to string without join
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
11 months ago
)
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.4 Safari/605.1.15
Browser/OS:
Safari 18 on Mac OS X 10.15.7
View result in a separate tab
Embed
Embed Benchmark Result
Test name
Executions per second
Array to string with join
135073.7 Ops/sec
Array to string without join
133849.8 Ops/sec
Related benchmarks:
String concatenation vs array join (with single push before)
String concatenation vs array join1
String concatenation vs array join vs array reduce
String concatenation vs array join precise
String concatenation vs array join preciselarge
String concatenation vs array join v6
String concatenation vs array join25
String.concat vs array.join
String concatenation vs array join aaaaa
Comments
Confirm delete:
Do you really want to delete benchmark?