Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:81.0) Gecko/20100101 Firefox/81.0
Firefox 81
Windows
Desktop
4 years ago
Test name Executions per second
for 155568.1 Ops/sec
for..of 172427.9 Ops/sec
for+cache 157567.7 Ops/sec
for+cache+cache 166045.1 Ops/sec
for+cache+cache+cache 183276.6 Ops/sec
for..of+cache 170500.0 Ops/sec
foreach + cache+ arrow 173661.5 Ops/sec
foreach + cache+ func 176361.5 Ops/sec
foreach 173317.4 Ops/sec
Script Preparation code:
Tests:
  • for

  • for..of

  • for+cache

  • for+cache+cache

  • for+cache+cache+cache

  • for..of+cache

  • foreach + cache+ arrow

  • foreach + cache+ func

  • foreach


;