Run details:
Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36
Chrome 75
Windows
Desktop
5 years ago
Test name Executions per second
Object.hasOwnProperty 3671749.8 Ops/sec
Object in 2252884.5 Ops/sec
Array.indexOf 518514.5 Ops/sec
direct 3022114.8 Ops/sec
Array includes 513519.1 Ops/sec
Script Preparation code:
Tests:
  • Object.hasOwnProperty

  • Object in

  • Array.indexOf

  • direct

  • Array includes