Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
String Interpolation vs Padding
(version: 0)
Comparing performance of:
String interpolation vs Padding
Created:
8 years ago
by:
Registered User
Jump to the latest result
Script Preparation code:
var hours = 1;
Tests:
String interpolation
var strHours = hours < 10 ? `0${hours}` : hours;
Padding
var strHours = hours.toString().padStart(2, '0');
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
String interpolation
Padding
Fastest:
N/A
Slowest:
N/A
Latest run results:
No previous run results
This benchmark does not have any results yet. Be the first one
to run it!
Related benchmarks:
Intl.DateTimeFormat vs Reduce/Replace Format
Intl.DateTimeFormat vs ReduceReplace Date Format 2
new Intl.DateTimeFormat vs cached Intl.DateTimeFormat
Intl.NumberFormat vs toLocalString vs cached Intl.NumberFormat
new Intl.DateTimeFormat vs cached Intl.DateTimeFormat vs custom
Comments
Confirm delete:
Do you really want to delete benchmark?