function calls: apply, call, and arguments

JavaScript performance comparison

Revision 13 of this test case created by

Preparation code


      
      <script>
Benchmark.prototype.setup = function() {
  var Obj = function() {};
  Obj.prototype.foo = function(f) { return f.call(this); };
  Obj.prototype.bar = function(f) { return f(); };
  
  var obj = new Obj();
  
  var f0 = function() { return this; }
  var f1 = f0.bind(obj);

};
</script>

Test runner

Warning! For accurate results, please disable Firebug before running the tests. (Why?)

Java applet disabled.

Testing in CCBot 2.0.0 / Other 0.0.0
Test Ops/sec
call
obj.foo(f0);
pending…
bind
obj.bar(f1);
pending…

Compare results of other browsers

Revisions

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

0 Comments