Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36
Chrome 132
Linux
Desktop
one month ago
Test name Executions per second
Object.hasOwn 36727512.0 Ops/sec
in 80147928.0 Ops/sec
Script Preparation code:
AخA
 
obj = {a: 42, b:66, c: 88}
Tests:
  • Object.hasOwn

     
    Object.hasOwn(obj, 'b')
  • in

     
    'b' in obj