Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:82.0) Gecko/20100101 Firefox/82.0
Firefox 82
Windows
Desktop
4 years ago
Test name Executions per second
Object.hasOwnProperty 11134455.0 Ops/sec
Object in 10242730.0 Ops/sec
Array.indexOf 186217.5 Ops/sec
direct 10230652.0 Ops/sec
Array includes 174738.9 Ops/sec
Set has 4986295.0 Ops/sec
Script Preparation code:
Tests:
  • Object.hasOwnProperty

  • Object in

  • Array.indexOf

  • direct

  • Array includes

  • Set has