Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
string-interpolation-vs-toString-vs-String
(version: 1)
Comparing performance of:
string-interpolation vs toSstring vs String
Created:
one year ago
by:
Guest
Go to the latest result
Script Preparation code:
var luckyNumber = Math.round(Math.random() * 100);
Tests:
string-interpolation
` ${luckyNumber}`
toSstring
luckyNumber.toString()
String
String(luckyNumber)
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (3)
Previous results
Fork
Test case name
Result
string-interpolation
toSstring
String
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
8 months ago
)
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36
Browser/OS:
Chrome 142 on Mac OS X 10.15.7
View result in a separate tab
Embed
Embed Benchmark Result
string-interpolation
189.3M/s
toSstring
161.5M/s
String
119.8M/s
View exact numbers
Test name
Executions per second
✓
string-interpolation
189,321,408 Ops/sec
toSstring
161,528,096 Ops/sec
String
119,800,056 Ops/sec
Related benchmarks
string-interpolation-vs-concatenation
string-interpolation-vs-toString
string-interpolation-vs-string-type-coercion
string-interpolation-vs-toString-vs-plus-string
string-interpolation-vs-to-string
Comments
Confirm delete:
Do you really want to delete benchmark?