call vs apply (v6)

Revision 6 of this benchmark created by mark 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
Obj.prototype.target.call(this, "YES");
ready
Obj.prototype.target("YES");
ready

Revisions

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