call vs apply (v35)

Revision 35 of this benchmark created by Benjamin on


Setup

function Obj() {
      var that = "that";
    }
    Obj.prototype.target = function() {
    };
    var that = {that: "that"};

Test runner

Ready to run.

Testing in
TestOps/sec
Call
Obj.prototype.target.call(that);
ready
Apply
Obj.prototype.target.apply(that);
ready
call.apply
Function.call.apply(Obj.prototype.target, that);
ready

Revisions

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