Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
string-interpolation-vs-concatenation-vs-join
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:137.0) Gecko/20100101 Firefox/137.0
Browser:
Firefox 137
Operating system:
Ubuntu
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
string-interpolation
146282384.0 Ops/sec
string-concatenation
517037664.0 Ops/sec
string-join
22628002.0 Ops/sec
string-appebd
71904744.0 Ops/sec
Script Preparation code:
var luckyNumber = Math.round(Math.random() * 100); var result = '';
Tests:
string-interpolation
result = `your lucky number for today is: ${luckyNumber}`
string-concatenation
result = 'your lucky number for today is:' + ' ' + luckyNumber
string-join
result = ['your lucky number for today is:', luckyNumber].join(' ');
string-appebd
result = 'your lucky number for today is:'.concat(' ').concat(luckyNumber);