Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.186 Safari/537.36
Chrome 64
Linux
Other
2025 years ago
Test name Executions per second
Array.reduce 33607.0 Ops/sec
for loop 301292.7 Ops/sec
Array.forEach 166801.1 Ops/sec
for of loop 256202.8 Ops/sec
Script Preparation code:
Tests:
  • Array.reduce

  • for loop

  • Array.forEach

  • for of loop