Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:81.0) Gecko/20100101 Firefox/81.0
Firefox 81
Windows
Desktop
4 years ago
Test name Executions per second
Object.hasOwnProperty 20927518.0 Ops/sec
Object in 21333298.0 Ops/sec
Array.indexOf 506021.5 Ops/sec
direct 20367618.0 Ops/sec
Array includes 445456.8 Ops/sec
Set has 9657442.0 Ops/sec
Script Preparation code:
Tests:
  • Object.hasOwnProperty

  • Object in

  • Array.indexOf

  • direct

  • Array includes

  • Set has