Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
number to string performance
(version: 6)
Comparing performance of:
string concat vs String object vs toString vs front concat double quote vs front concat single quote vs front concat back tick vs back concat double quote vs string template
Created:
3 years ago
by:
Registered User
Jump to the latest result
Script Preparation code:
var number = 27387329; var str;
Tests:
string concat
str = "" + number + "";
String object
str = String(number);
toString
str = number.toString();
front concat double quote
str = "" + number;
front concat single quote
str = '' + number;
front concat back tick
str = `` + number;
back concat double quote
str = number + "";
string template
str = `${number}`;
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (8)
Previous results
Fork
Test case name
Result
string concat
String object
toString
front concat double quote
front concat single quote
front concat back tick
back concat double quote
string template
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:
Parse string to number
Int conversion
String to int vs int to string 2
Number vs parseInt vs +string
String to number, parseInt, +, or * 1
Comments
Confirm delete:
Do you really want to delete benchmark?