Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36
Chrome 118
Mac OS X 10.15.7
Desktop
one year ago
Test name Executions per second
array.find 1st 16660478.0 Ops/sec
array.find middle 15553357.0 Ops/sec
array find last 14700533.0 Ops/sec
map.get 18494250.0 Ops/sec
iterate array 8880659.0 Ops/sec
iterate object 413742.3 Ops/sec
Script Preparation code:
Tests:
  • array.find 1st

  • array.find middle

  • array find last

  • map.get

  • iterate array

  • iterate object

  • iterate object predefined keys

  • Object.entries


;