Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36
Chrome 90
Mac OS X 10.11.6
Desktop
3 years ago
Test name Executions per second
Object.hasOwnProperty 3139086.5 Ops/sec
Object in 3103181.0 Ops/sec
Array.indexOf 742081.1 Ops/sec
direct 3162618.0 Ops/sec
Array includes 750021.2 Ops/sec
Script Preparation code:
Tests:
  • Object.hasOwnProperty

  • Object in

  • Array.indexOf

  • direct

  • Array includes