Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
Feature Requests
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 (Macintosh; Intel Mac OS X 10.15; rv:133.0) Gecko/20100101 Firefox/133.0
Browser:
Firefox 133
Operating system:
Mac OS X 10.15
Device Platform:
Desktop
Date tested:
one year ago
Benchmark engine:
Benchmark.js
string-concatenation
408.5M/s
string-interpolation
110.0M/s
string-appebd
56.0M/s
string-join
23.6M/s
View exact numbers
Test name
Executions per second
✓
string-concatenation
408,493,408 Ops/sec
string-interpolation
110,009,568 Ops/sec
string-appebd
55,972,800 Ops/sec
string-join
23,588,520 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);