function calls: apply, call, and arguments

JavaScript performance comparison

Revision 13 of this test case created

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 unknown unknown
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. Here’s a list of current revisions for this page:

0 comments

Add a comment