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 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36
Browser:
Chrome 130
Operating system:
Windows
Device Platform:
Desktop
Date tested:
one year ago
Benchmark engine:
Benchmark.js
string-concatenation
7.0M/s
string-interpolation
7.0M/s
string-appebd
6.9M/s
string-join
5.3M/s
View exact numbers
Test name
Executions per second
✓
string-concatenation
7,047,096 Ops/sec
string-interpolation
6,975,000 Ops/sec
string-appebd
6,931,235 Ops/sec
string-join
5,275,468 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);