Run details:
Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko
IE 11
Windows
Desktop
2 years ago
Test name Executions per second
for let 1366.4 Ops/sec
for var 1382.5 Ops/sec
for let cached 1891.2 Ops/sec
for let cached (const) 1869.0 Ops/sec
for var cached 1889.7 Ops/sec
forEach 2125.7 Ops/sec
Script Preparation code:
Tests:
  • for let

  • for var

  • for let cached

  • for let cached (const)

  • for var cached

  • forEach