Run details:
Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36
Chrome 52
Windows
Other
8 years ago
Test name Executions per second
this 84435.6 Ops/sec
that 80209.3 Ops/sec
Script Preparation code:
x
 
function Monster()
{
    this.x = 100;
    this.y = 100;
    console.log("Monster created at " + this.x + " / " + this.y + "!");
}
function Monster2()
{
    var that = this;
    that.x = 100;
    that.y = 100;
    console.log("Monster created at " + that.x + " / " + that.y + "!");
}
Tests:
  • this

     
    new Monster();
  • that

     
    new Monster2();