Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36
Chrome 119
Mac OS X 10.15.7
Desktop
one year ago
Test name Executions per second
Object.hasOwnProperty 5249538.5 Ops/sec
Object in 4755548.5 Ops/sec
Array.indexOf 725379.4 Ops/sec
direct 4801254.5 Ops/sec
Array includes 728249.4 Ops/sec
Set has 5518485.0 Ops/sec
Script Preparation code:
Tests:
  • Object.hasOwnProperty

  • Object in

  • Array.indexOf

  • direct

  • Array includes

  • Set has