bind vs that (v3)

Revision 3 of this benchmark created by Chris Khoo on


Preparation HTML

<script>
var object = {
  member: 'value'
};

// bind
function thisFunction() {
  return this.member;
}
var bindFunction = thisFunction.bind(object);

// that
var that = object;
function thatFunction() {
  return that.member;
}
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
bind
bindFunction();
ready
that
thatFunction();
ready

Revisions

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