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
Jump 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
Test name
Executions per second
Template Literal
120808768.0 Ops/sec
Stringify number
88357560.0 Ops/sec
Related benchmarks:
Template vs Regular strings
String() vs template literal
String() vs toString
string concatenation vs template
string vs template
string vs template vs toString
String to int vs int to string
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?