array includes vs object[key] vs key in object

Performance test on array.includes, object[key] accessor and key in object check
8 months ago
User agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36
Test name Executions per second
Includes 24889806.0 Ops/sec
Object[key] 23664464.0 Ops/sec
key in object 23021070.0 Ops/sec
Script Preparation code:
Tests:
  • Includes

  • Object[key]

  • key in object

Open this result on MeasureThat.net