Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.122 Safari/537.36
Chrome 80
Windows
Desktop
4 years ago
Test name Executions per second
for var 76470.3 Ops/sec
for let 76048.4 Ops/sec
for var cached length 153311.6 Ops/sec
for let cached length 152660.4 Ops/sec
forEach function 151226.9 Ops/sec
forEach arrow 151100.9 Ops/sec
some function 152869.2 Ops/sec
some arrow 148868.4 Ops/sec
for...of var 149375.3 Ops/sec
for...of const 149218.9 Ops/sec
Script Preparation code:
Tests:
  • for var

  • for let

  • for var cached length

  • for let cached length

  • forEach function

  • forEach arrow

  • some function

  • some arrow

  • for...of var

  • for...of const