Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.104 Safari/537.36
Chrome 94
Linux
Desktop
3 years ago
Test name Executions per second
for loop 690.5 Ops/sec
Array.prototype.reduce.call 63.6 Ops/sec
Array.prototype.reduce.apply 60.2 Ops/sec
Array.prototype.forEach 56.1 Ops/sec
.split.reduce 477.7 Ops/sec
.split.forEach 450.0 Ops/sec
Script Preparation code:
Tests:
  • for loop

  • Array.prototype.reduce.call

  • Array.prototype.reduce.apply

  • Array.prototype.forEach

  • .split.reduce

  • .split.forEach


;