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 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Mobile Safari/537.36
Browser:
Chrome Mobile 138
Operating system:
Android
Device Platform:
Mobile
Date tested:
10 months ago
Test name
Executions per second
+ operator
1578311.0 Ops/sec
concat()
1636347.9 Ops/sec
template interpolation
2412954.8 Ops/sec
Array.prototype.join
1236978.9 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('')