Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
String vs. Template Literal with var
(version: 1)
Comparing performance of:
Template Literal String vs Regular String
Created:
one year ago
by:
Guest
Jump to the latest result
Tests:
Template Literal String
for (let i = 0; i < 80; ++i) { let result = `Some string $i`; }
Regular String
for (let i = 0; i < 80; ++i) { let result = "Some string"; }
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
Template Literal String
Regular String
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
one year ago
)
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36
Browser/OS:
Chrome 134 on Mac OS X 10.15.7
View result in a separate tab
Embed
Embed Benchmark Result
Test name
Executions per second
Template Literal String
43448872.0 Ops/sec
Regular String
43785784.0 Ops/sec
Related benchmarks:
var vs let
For let vs for var
concatenation vs template literal
String() vs template literal
toString vs string template literal
number to string: template literal vs toString vs string literal concat vs string constructor
String vs. Template Literal
String vs template string
String vs. Template Literal with var 2
Comments
Confirm delete:
Do you really want to delete benchmark?