Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.103 Safari/537.36
Chrome 73
Mac OS X 10.13.6
Desktop
5 years ago
Test name Executions per second
Object.hasOwnProperty 5027866.5 Ops/sec
Object in 3126091.0 Ops/sec
Array.indexOf 746765.7 Ops/sec
direct 4320265.5 Ops/sec
Array includes 751476.4 Ops/sec
Script Preparation code:
Tests:
  • Object.hasOwnProperty

  • Object in

  • Array.indexOf

  • direct

  • Array includes