Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36
Chrome 114
Mac OS X 10.15.7
Desktop
one year ago
Test name Executions per second
Get from Object 31991546.0 Ops/sec
Has key in Object 31933170.0 Ops/sec
Get from Map 32028478.0 Ops/sec
Has key in Map 32215910.0 Ops/sec
Get from Array 32369268.0 Ops/sec
Has key in Array OLD 23299804.0 Ops/sec
Has key in Array NEW 31840016.0 Ops/sec
Has key in Set 31759360.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


;