number to string (v39)

Revision 39 of this benchmark created on


Preparation HTML

<script>
  var num = (1024 * 1024 * 1024 * 1024),
      str;
</script>

Setup

function toString(int) {
      return '' + int;
    }

Test runner

Ready to run.

Testing in
TestOps/sec
String literal
str = "" + num + "";
ready
String constructor
str = String(num);
ready
toString
str = num.toString();
ready
String Literal simple
str = "" + num;
ready
Function String Literal simple
str = toString(num);
ready

Revisions

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