Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.113 Safari/537.36
Chrome 96
Linux
Desktop
2 years ago
Test name Executions per second
Object.hasOwnProperty 2091672.2 Ops/sec
Object in 1841984.4 Ops/sec
Array.indexOf 603133.0 Ops/sec
direct 1967670.8 Ops/sec
Array includes 612988.1 Ops/sec
Set has 2181837.8 Ops/sec
Script Preparation code:
Tests:
  • Object.hasOwnProperty

  • Object in

  • Array.indexOf

  • direct

  • Array includes

  • Set has