Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Number to String Performance Benchmark
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36
Browser:
Chrome 117
Operating system:
Mac OS X 10.15.7
Device Platform:
Desktop
Date tested:
2 years ago
empty string plus n
25.7M/s
to string
24.7M/s
template
24.5M/s
string n
9.4M/s
View exact numbers
Test name
Executions per second
✓
empty string plus n
25,695,812 Ops/sec
to string
24,730,268 Ops/sec
template
24,484,680 Ops/sec
string n
9,396,307 Ops/sec
Script Preparation code:
var n = 1;
Tests:
string n
String(n);
to string
n.toString();
empty string plus n
""+n
template
`${n}`