Run details:
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:104.0) Gecko/20100101 Firefox/104.0
Firefox 104
Ubuntu
Desktop
2 years ago
Test name Executions per second
Object.prototype.hasOwnProperty 1491104256.0 Ops/sec
obj.hasOwnProperty 1425812096.0 Ops/sec
Object.hasOwn 1488389376.0 Ops/sec
Script Preparation code:
AخA
 
obj = {a: 42, b:66, c: 88}
Tests:
  • Object.prototype.hasOwnProperty

     
    Object.prototype.hasOwnProperty.call(obj, 'b');
  • obj.hasOwnProperty

     
    obj.hasOwnProperty('b');
  • Object.hasOwn

     
    Object.hasOwn(obj, 'b')