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; rv:122.0) Gecko/20100101 Firefox/122.0
Browser:
Firefox 122
Operating system:
Windows
Device Platform:
Desktop
Date tested:
2 years ago
Benchmark engine:
Benchmark.js
string-concatenation
397.2M/s
string-interpolation
121.1M/s
string-appebd
44.1M/s
string-join
4.0M/s
View exact numbers
Test name
Executions per second
✓
string-concatenation
397,157,728 Ops/sec
string-interpolation
121,074,656 Ops/sec
string-appebd
44,083,072 Ops/sec
string-join
4,016,663 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);