Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 11_2_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.82 Safari/537.36
Chrome 89
Mac OS X 11.2.2
Desktop
3 years ago
Test name Executions per second
Get from Object 5430863.5 Ops/sec
Get from Map 4800451.5 Ops/sec
Has key in Map 4464674.0 Ops/sec
Has key in Array OLD 64913.8 Ops/sec
Has key in Array NEW 52922.3 Ops/sec
Has key in Set 4614307.0 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