Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36
Chrome 109
Mac OS X 10.14.6
Desktop
one year ago
Test name Executions per second
Object.hasOwnProperty 4092275.8 Ops/sec
Object in 3738293.8 Ops/sec
Array.indexOf 778427.6 Ops/sec
direct 3652851.2 Ops/sec
Array includes 732691.2 Ops/sec
Script Preparation code:
Tests:
  • Object.hasOwnProperty

  • Object in

  • Array.indexOf

  • direct

  • Array includes