Script Preparation code:
x
 
window.AClass = class {
  b() {
    return 4;
  }
}
window.AFunc = function() {
  return {
    b() {
      return 4;
    }
  };
};
Tests:
  • Class instance method lookup

     
    const a = new AClass();
    a.b();
  • Function-created object method lookup

     
    const a = new AFunc();
    a.b();
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    Class instance method lookup
    Function-created object method lookup

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 4 years ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:84.0) Gecko/20100101 Firefox/84.0
Firefox 84 on Windows
View result in a separate tab
Test name Executions per second
Class instance method lookup 68332160.0 Ops/sec
Function-created object method lookup 31726560.0 Ops/sec