Run details:
Mozilla/5.0 (iPhone; CPU iPhone OS 13_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/85.0.4183.92 Mobile/15E148 Safari/604.1
Chrome Mobile iOS 85
iOS 13.7
Mobile
4 years ago
Test name Executions per second
for 373.6 Ops/sec
for of 460.6 Ops/sec
forEach 458.6 Ops/sec
reduce 455.1 Ops/sec
Script Preparation code:
Tests:
  • for

  • for (less closure)

  • for of

  • for of (less closure)

  • forEach

  • forEach (less closure)

  • reduce

  • reduce (less closure)


;