bind vs closure (v51)

Revision 51 of this benchmark created by netwjx on


Preparation HTML

<script>
var obj = {
  foo: function(){
    this.toString();
  }
};
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
bind()
var func = obj.foo.bind(obj);
func();
ready
closure
var func = function(){ obj.foo() };
func();
ready
skip1
throw new Error('skip')
ready
skip2
throw new Error('skip')
ready
skip3
throw new Error('skip')
ready

Revisions

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