foreach call vs prototype-call (v6)

Revision 6 of this benchmark created on


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
basic 2
function call(fn) {
  fn();
}

callbacks.forEach(call);
ready

Revisions

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