number to string (v33)

Revision 33 of this benchmark created by v on


Preparation HTML

<script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/2.4.1/lodash.min.js"></script>
<script>
  var items = ['this is a string', 29, 'another string', 332, 'this']
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
To string
_.map(items, function(item){return item.toString()});
ready
String constructor
_.map(items, String);
ready
implicit
_.map(items, function(item){return '' + item});
ready
new String
_.map(items, function(item){return new String(item)});
ready

Revisions

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