Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36
Chrome 112
Mac OS X 10.15.7
Desktop
one year ago
Test name Executions per second
Get from Object 31435188.0 Ops/sec
Has key in Object 31245580.0 Ops/sec
Get from Map 31343542.0 Ops/sec
Has key in Map 31417712.0 Ops/sec
Get from Array 31212048.0 Ops/sec
Has key in Array OLD 22157978.0 Ops/sec
Has key in Array NEW 31378482.0 Ops/sec
Has key in Set 31434404.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


;