Cast To String (v9)

Revision 9 of this benchmark created on


Test runner

Ready to run.

Testing in
TestOps/sec
String Function
var myVar = 87,
    newString;
newString = String(myVar);
ready
String Constructor
var myVar = 87,
    newString;
newString = new String(myVar);
ready
Concatenate Empty String
var myVar = 87,
    newString;
newString = myVar + "";
ready
toString Method
var myVar = 87,
    newString;
newString = myVar.toString();
ready
Concatenate Empty String at start
var myVar = 87,
    newString;
newString = '' + myVar;
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.