Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36
Chrome 118
Windows
Desktop
one year ago
Test name Executions per second
get item by indx 12.9 Ops/sec
cycle by for in (indx is val) 24.0 Ops/sec
cycle by for OF (elem is val) 4645.5 Ops/sec
cycle by for OF (elem is CONST) 3921.9 Ops/sec
cycle by for IN (indx is CONST) 69.2 Ops/sec
Script Preparation code:
Tests:
  • get item by indx

  • cycle by for in (indx is val)

  • cycle by for OF (elem is val)

  • cycle by for OF (elem is CONST)

  • cycle by for IN (indx is CONST)


;