Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36
Chrome 119
Windows
Desktop
one year ago
Test name Executions per second
regular for (;;) 5094.0 Ops/sec
for..in 4120.9 Ops/sec
for..of 4992.3 Ops/sec
forEach() 4927.9 Ops/sec
map() 4624.0 Ops/sec
reduce() 55952.6 Ops/sec
Script Preparation code:
Tests:
  • regular for (;;)

  • for..in

  • for..of

  • forEach()

  • map()

  • reduce()