Run details:
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:82.0) Gecko/20100101 Firefox/82.0
Firefox 82
Ubuntu
Desktop
4 years ago
Test name Executions per second
Object.hasOwnProperty 12994254.0 Ops/sec
Object in 12429511.0 Ops/sec
Array.indexOf 273172.2 Ops/sec
direct 12107127.0 Ops/sec
Array includes 233774.8 Ops/sec
Set has 5641750.0 Ops/sec
Script Preparation code:
Tests:
  • Object.hasOwnProperty

  • Object in

  • Array.indexOf

  • direct

  • Array includes

  • Set has