Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Array join vs string add concat
(version: 0)
Comparing performance of:
Array vs string add concat
Created:
3 years ago
by:
Guest
Jump to the latest result
Script Preparation code:
var str = "Hello World" var newStr = "Goodbye" var start = 5
Tests:
Array
const foo = [ str.slice(0, start), newStr, str.slice(start) ].join('')
string add concat
const foo = `${str.slice(0, start)}` + `${newStr}` + `${str.slice(start)}`
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
Array
string add concat
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 vs array join Performance:3
Concat vs Join
str += vs join
String concatenation vs array join precise
string concat + join vs unshift + join
Comments
Confirm delete:
Do you really want to delete benchmark?