Script Preparation code:
x
 
class A {
  execute() {
    
  }
  
  callback1() {}
  
  callback2() {}
}
window.a = new A();
Tests:
  • bind

     
    a.execute = function () {
      let bound1 = this.callback1.bind(this);
      let bound2 = this.callback2.bind(this);
        
      bound1();
      bound2();
    }
    a.execute();
  • arrow

     
    a.execute = function () {
      let bound1 = () => this.callback1();
      let bound2 = () => this.callback2();
        
      bound1();
      bound2();
    }
    a.execute();
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    bind
    arrow

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 4 months ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36
Chrome 131 on Windows
View result in a separate tab
Test name Executions per second
bind 60242852.0 Ops/sec
arrow 61758584.0 Ops/sec