Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36 Edg/120.0.0.0
Chrome 120
Windows
Desktop
one year ago
Test name Executions per second
map comparison: for..of 83.4 Ops/sec
map comparison: .map 171.1 Ops/sec
reduce comparision: for..of 433.1 Ops/sec
reduce comparision: .reduce 173.9 Ops/sec
raw iteration: for..of 524.3 Ops/sec
raw iteration: forEach 568.1 Ops/sec
Script Preparation code:
Tests:
  • map comparison: for..of

  • map comparison: .map

  • reduce comparision: for..of

  • reduce comparision: .reduce

  • raw iteration: for..of

  • raw iteration: forEach


;