Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
traditional string concat vs template string concat + array join fixed
(version: 1)
Comparing performance of:
traditional string concat vs template string concat vs Array join
Created:
9 months ago
by:
Guest
Jump to the latest result
Script Preparation code:
const a = Math.random(); const b = Math.random(); const c = Math.random(); const d = Math.random(); const arr = [a, b, c, d];
Tests:
traditional string concat
const str = a + ',' + b + ',' + c + ',' + d;
template string concat
const str = `${a},${b},${c},${d}`;
Array join
const str = arr.join(",")
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (3)
Previous results
Fork
Test case name
Result
traditional string concat
template string concat
Array join
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
8 months ago
)
User agent:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Safari/537.36
Browser/OS:
Chrome 139 on Linux
View result in a separate tab
Embed
Embed Benchmark Result
Test name
Executions per second
traditional string concat
198147680.0 Ops/sec
template string concat
190841328.0 Ops/sec
Array join
17242538.0 Ops/sec
Related benchmarks:
concat vs plus string
Template strings vs. String.concat
Template strings vs. String.concat v2
String.prototype.concat vs Array.prototype.join
Template strings vs. String.concat, v2
String concatenation vs concat method
string_concat_vs_append
template literal vs array.join vs string.concat vs the + operator
【JiangNanGame】traditional string concat vs template string concat
Comments
Confirm delete:
Do you really want to delete benchmark?