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 27802998.0 Ops/sec
Has key in Object 27237176.0 Ops/sec
Get from Map 26784090.0 Ops/sec
Has key in Map 25076914.0 Ops/sec
Get from Array 28183326.0 Ops/sec
Has key in Array OLD 20937424.0 Ops/sec
Has key in Array NEW 28258610.0 Ops/sec
Has key in Set 27679324.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


;