foreach call vs prototype-call (v11)

Revision 11 of this benchmark created on


Preparation HTML

<script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/3.10.1/lodash.min.js"></script>

Setup

var callbacks = [];
    for (var i = 0; i < 10; i++) {
      callbacks.push(function() {});
    }

Test runner

Ready to run.

Testing in
TestOps/sec
basic
callbacks.forEach(function(cb) {
  cb();
});
ready
Function.prototype.call
callbacks.forEach(Function.prototype.call, Function.prototype.call);
ready
lodash _.call
callbacks.forEach(_.call, _.call);
ready

Revisions

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