call vs apply (v32)

Revision 32 of this benchmark created by atstek on


Setup

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

Test runner

Ready to run.

Testing in
TestOps/sec
apply
Obj.prototype.target.apply(this, ["YES"]);
ready
call
var a = ["YES"]
Obj.prototype.target.call(this, a[0], arguments[0], arguments[1], arguments[2], arguments[4]);
ready

Revisions

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