Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:92.0) Gecko/20100101 Firefox/92.0
Firefox 92
Mac OS X 10.15
Desktop
3 years ago
Test name Executions per second
Array.map() 5961483.0 Ops/sec
Array.reduce().concat() 1688822.6 Ops/sec
Array.reduce().push() 4147934.2 Ops/sec
Array.reduce() spread 1496476.8 Ops/sec
Script Preparation code:
Tests:
  • Array.map()

  • Array.reduce().concat()

  • Array.reduce().push()

  • Array.reduce() spread