Run details:
Mozilla/5.0 (X11; Linux x86_64; rv:123.0) Gecko/20100101 Firefox/123.0
Firefox 123
Linux
Desktop
9 months ago
Test name Executions per second
Object.hasOwnProperty 945507648.0 Ops/sec
Object in 891083392.0 Ops/sec
Array.indexOf 8324755.5 Ops/sec
direct 941446272.0 Ops/sec
Array find 45489.6 Ops/sec
Map has 790937088.0 Ops/sec
Script Preparation code:
Tests:
  • Object.hasOwnProperty

  • Object in

  • Array.indexOf

  • direct

  • Array find

  • Map has