Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36
Chrome 111
Mac OS X 10.15.7
Desktop
one year ago
Test name Executions per second
Get from Object 18888394.0 Ops/sec
Has key in Object 19098244.0 Ops/sec
Get from Map 18919172.0 Ops/sec
Has key in Map 18876270.0 Ops/sec
Get from Array 18939272.0 Ops/sec
Has key in Array OLD 12276512.0 Ops/sec
Has key in Array NEW 18480476.0 Ops/sec
Has key in Set 17933326.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


;