Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36
Chrome 109
Windows
Desktop
one year ago
Test name Executions per second
regular for (;;) 525.5 Ops/sec
for..in 503.7 Ops/sec
for..of 623.0 Ops/sec
forEach() 538.9 Ops/sec
map() 553.0 Ops/sec
reduce() 2666.1 Ops/sec
Script Preparation code:
Tests:
  • regular for (;;)

  • for..in

  • for..of

  • forEach()

  • map()

  • reduce()