Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.119 Safari/537.36
Chrome 72
Linux
Desktop
5 years ago
Test name Executions per second
Object.hasOwnProperty 3232547.0 Ops/sec
Object in 1990459.1 Ops/sec
Array.indexOf 484090.7 Ops/sec
direct 2726860.8 Ops/sec
Array includes 419154.8 Ops/sec
Script Preparation code:
Tests:
  • Object.hasOwnProperty

  • Object in

  • Array.indexOf

  • direct

  • Array includes