Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36
Chrome 110
Mac OS X 10.15.7
Desktop
one year ago
Test name Executions per second
in (true) 18075214.0 Ops/sec
in (false) 17254400.0 Ops/sec
obj.hasOwnProperty (true) 14790597.0 Ops/sec
obj.hasOwnProperty (false) 14670110.0 Ops/sec
prototype.hasOwnProperty.call (true) 5349114.0 Ops/sec
prototype.hasOwnProperty.call (false) 5242667.5 Ops/sec
indexer (true) 17487806.0 Ops/sec
indexer (false) 17078032.0 Ops/sec
Script Preparation code:
Tests:
  • in (true)

  • in (false)

  • obj.hasOwnProperty (true)

  • obj.hasOwnProperty (false)

  • prototype.hasOwnProperty.call (true)

  • prototype.hasOwnProperty.call (false)

  • indexer (true)

  • indexer (false)