Bind vs Self closure (v2)

Revision 2 of this benchmark created on


Preparation HTML

<script>
  this.a = 0;

  var binded = (function () {
    this.a = 1;
  }).bind(this);

  var self = this;
  function closured() {
    self.a = 1;
  }
  
  var applied = function() {
    this.a = 1;
  };
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
binded
binded();
ready
closured
closured()
ready
Apply
applied.apply(this);
ready

Revisions

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