Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.84 Safari/537.36
Chrome 99
Windows
Desktop
2 years ago
Test name Executions per second
Get from Object 6968204.5 Ops/sec
Has key in Object 7065882.5 Ops/sec
Get from Map 7081697.5 Ops/sec
Has key in Map 7143413.5 Ops/sec
Get from Array 7215502.5 Ops/sec
Has key in Array OLD 5920551.5 Ops/sec
Has key in Array NEW 7269149.5 Ops/sec
Has key in Set 6151099.5 Ops/sec
Script Preparation code:
Tests:
  • Get from Object

  • Has key in Object

  • Get from Map

  • Has key in Map

  • Get from Array

  • Has key in Array OLD

  • Has key in Array NEW

  • Has key in Set


;