Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 11_3_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.192 Safari/537.36
Chrome 88
Mac OS X 11.3.0
Desktop
3 years ago
Test name Executions per second
Get from Object 7617282.0 Ops/sec
Get from Map 6638571.5 Ops/sec
Has key in Map 6456523.5 Ops/sec
Has key in Array OLD 45013.1 Ops/sec
Has key in Array NEW 43255.4 Ops/sec
Has key in Set 6977622.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