Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
string interpolation vs string concatenation vs [].join()
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36
Browser:
Chrome 138
Operating system:
Linux
Device Platform:
Desktop
Date tested:
10 months ago
Test name
Executions per second
+ operator
3729015.0 Ops/sec
concat()
3943133.0 Ops/sec
template interpolation
6332252.5 Ops/sec
Array.prototype.join
2887848.2 Ops/sec
HTML Preparation code:
<!--your preparation HTML code goes here-->
Script Preparation code:
let { a, b, c, d, e, f, g, h } = new Proxy({}, { // lazy get(t, p) { let a = { __proto__: null, toString() { return p } } a[Symbol.toPrimitive] = a.valueOf = a.toString return a } })
Tests:
+ operator
a+b+c+d+e+f+g+h
concat()
''.concat(a,b,c,d,e,f,g,h)
template interpolation
;`${a}${b}${c}${d}${e}${f}${g}${h}`
Array.prototype.join
;[a,b,c,d,e,f,g,h].join('')