bound vs saved context (v2)

Revision 2 of this benchmark created on


Preparation HTML

<script>
function MyClass() {
  this.a = 0;
}

var my_class_inst = new MyClass(),
    bound = function() {
        this.a = this.a + 1;
    }.bind(my_class_inst),
    context = function() {
        my_class_inst.a = my_class_inst.a + 1;
    };
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
bind
bound();
ready
saved context
context();
ready

Revisions

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