underscore 2065 (v7)

Revision 7 of this benchmark created on


Description

Tests for pr 2065

Preparation HTML

<script src="https://rawgithub.com/jashkenas/underscore/1.8.1/underscore.js"></script>

<script src="https://rawgithub.com/jashkenas/underscore/b47c21a68d8a2a8d2842512d7841c92a73dc6735/underscore.js"></script>

<script src="https://rawgithub.com/jridgewell/underscore/81d8d81/underscore.js"></script>

<script>
var opt = _.noConflict();
var refined = _.noConflict();
var _181 = _;
</script>

Setup

var data = _.reduce(_.range(26), function(o, v) {
       o[String.fromCharCode(v + 97)] = v;
       return o;
    }, {});
    var callback = function(value, key, object) {
       return value % 2 === 0;
    };

Test runner

Ready to run.

Testing in
TestOps/sec
Pick (1.8.1, arguments)
_181.pick(data, 'a', 'c', 'm', 'nope', 'z');
ready
Pick (refined, arguments)
refined.pick(data, 'a', 'c', 'm', 'nope', 'z');
ready
Omit (1.8.1, arguments)
_181.omit(data, 'a', 'c', 'm', 'nope', 'z');
ready
Omit (refined, arguments)
refined.omit(data, 'a', 'c', 'm', 'nope', 'z');
ready
Pick (1.8.1, predicate)
_181.pick(data, callback);
ready
Pick (refined, predicate)
refined.pick(data, callback);
ready
Omit (1.8.1, predicate)
_181.omit(data, callback);
ready
Omit (refined, predicate)
refined.omit(data, callback);
ready
Pick (opt, arguments)
opt.pick(data, 'a', 'c', 'm', 'nope', 'z');
ready
Pick (opt, predicate)
opt.pick(data, callback);
ready
Omit (opt, arguments)
opt.omit(data, 'a', 'c', 'm', 'nope', 'z');
ready
Omit (opt, predicate)
opt.omit(data, callback);
ready

Revisions

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

  • Revision 5: published by Emanuel Jackstare on
  • Revision 7: published on