number to string (v31)

Revision 31 of this benchmark created by me on


Preparation HTML

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

Test runner

Ready to run.

Testing in
TestOps/sec
String implicit
str = '' + num;
ready
String constructor
str = String(num);
ready
toString
str = num.toString();
ready
new String
str = new String(num)
ready
converting string to string
str = '' + str2;
ready

Revisions

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