Run details:
Mozilla/5.0 (Linux; Android 10; Pixel XL) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.115 Mobile Safari/537.36
Chrome Mobile 92
Android
Mobile
3 years ago
Test name Executions per second
Object.hasOwnProperty 704261.4 Ops/sec
Object in 678757.7 Ops/sec
Array.indexOf 161484.7 Ops/sec
direct 609916.5 Ops/sec
Array includes 158425.0 Ops/sec
Set has 733026.6 Ops/sec
Script Preparation code:
Tests:
  • Object.hasOwnProperty

  • Object in

  • Array.indexOf

  • direct

  • Array includes

  • Set has