call vs apply (v87)

Revision 87 of this benchmark created by Yves on


Setup

function Obj() {
      var that = "that";
    }
    Obj.prototype.target = function(arg) {
      var string = "that: " + this.that + ", arg: " + arg;
      return string;
    };
    
    var myObj = new Obj();

Test runner

Ready to run.

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

Revisions

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