Run details:
Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36
Chrome 72
Windows
Desktop
5 years ago
Test name Executions per second
Object.hasOwnProperty 4649850.0 Ops/sec
Object in 2899488.8 Ops/sec
Array.indexOf 535430.1 Ops/sec
direct 3980310.5 Ops/sec
Array includes 645772.9 Ops/sec
Script Preparation code:
Tests:
  • Object.hasOwnProperty

  • Object in

  • Array.indexOf

  • direct

  • Array includes