Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36
Chrome 119
Mac OS X 10.15.7
Desktop
one year ago
Test name Executions per second
Get from Object 31688396.0 Ops/sec
Has key in Object 31480104.0 Ops/sec
Get from Map 25517974.0 Ops/sec
Has key in Map 32190726.0 Ops/sec
Get from Array 32398386.0 Ops/sec
Has key in Array OLD 22399304.0 Ops/sec
Has key in Array NEW 32330342.0 Ops/sec
Has key in Set 31588048.0 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


;