Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Template Literal vs String
(version: 1)
Comparing performance of:
Template Literal vs Stringify number
Created:
one year ago
by:
Guest
Go to the latest result
Script Preparation code:
var n = 1000;
Tests:
Template Literal
var text = `${n}`;
Stringify number
var text = String(n);
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
Template Literal
Stringify number
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
one year ago
)
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.6834.84 Safari/537.36
Browser/OS:
Chrome 132 on Windows
View result in a separate tab
Embed
Embed Benchmark Result
Template Literal
120.8M/s
Stringify number
88.4M/s
View exact numbers
Test name
Executions per second
✓
Template Literal
120,808,768 Ops/sec
Stringify number
88,357,560 Ops/sec
Related benchmarks
String() vs template literal
String() vs toString
string concatenation vs template
string vs template vs toString
number to string: template literal vs toString vs string literal concat vs string constructor
Concatenation vs Template String
Number to String Performance Benchmark
Comments
Confirm delete:
Do you really want to delete benchmark?