reduce-under (v10)

Revision 10 of this benchmark created on


Preparation HTML

<script src="//rawgit.com/jashkenas/underscore/master/underscore.js"></script>

<script src="//rawgit.com/megawac/underscore/reduce/underscore.js"></script>
<script>var megascore = _.noConflict();</script>
<script src="//rawgit.com/lodash/lodash/375d984ec46b53509e55a6a8d72b684552821018/lodash.js"></script>
<script>var lodash = _.noConflict();</script>

Setup

var testData = _.shuffle(_.range(100));

Test runner

Ready to run.

Testing in
TestOps/sec
_.reduce (array)
var result = _.reduce(testData, function(result, num) {
  result + num;
});
ready
new _.reduce (array)
var result = megascore.reduce(testData, function(result, num) {
  result + num;
});
ready
lodash
var result = lodash.reduce(testData, function(result, num) {
  result + num;
});
ready

Revisions

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