Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.82 Safari/537.36
Chrome 89
Windows
Desktop
3 years ago
Test name Executions per second
Get from Object 2709073.2 Ops/sec
Get from Map 2508754.0 Ops/sec
Has key in Map 2545674.2 Ops/sec
Has key in Array OLD 32793.8 Ops/sec
Has key in Array NEW 33585.3 Ops/sec
Has key in Set 2563019.5 Ops/sec
Script Preparation code:
Tests:
  • Get from Object

  • Get from Map

  • Has key in Map

  • Has key in Array OLD

  • Has key in Array NEW

  • Has key in Set