underscore 1639 (v5)

Revision 5 of this benchmark created by Emanuel Jackstare on


Description

Tests for pr 1639

Preparation HTML

<script src="//rawgithub.com/jashkenas/underscore/e583e59d7d51b7a0ace4f6fadafbc5ec6f1aead4/underscore.js"></script>

<script src="//rawgit.com/megawac/underscore/_.pick-opt/underscore.js"></script>

<script>
var underscore = _.noConflict();
</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
Omit with argument keys
_.omit(data, 'a', 'c', 'm', 'nope', 'z');
ready
New Omit with argument keys
underscore.omit(data, 'a', 'c', 'm', 'nope', 'z');
ready
Pick with predicate
_.pick(data, callback);
ready
New pick with predicate
underscore.pick(data, callback);
ready
Omit with predicate
_.omit(data, callback);
ready
New omit with predicate
underscore.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