number to string (v27)

Revision 27 of this benchmark created by Plumpnation on


Preparation HTML

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

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
String Literal simple function
str = function(num) {
return "" + num;
}
ready
String function
str = function(num) {
return num.toString + "";
}
ready
String Literal simple 2
str = num + "";
ready
String concat int
str = ''.concat(num);
ready

Revisions

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