Spread operator vs. Array.map and lodash.set

A comparison of the performance of the spread operator, [ ...array ], vs. Array.map(i => ...) and
3 months ago
User agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36
Test name Executions per second
Spread operator 99463.9 Ops/sec
Spread operator v2 102718.9 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • Spread operator

  • Spread operator v2

Open this result on MeasureThat.net