Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.2 Safari/605.1.15
Safari 15
Mac OS X 10.15.7
Desktop
2 years ago
Test name Executions per second
Array clone with spread operator 7826059.5 Ops/sec
Array clone with slice 6352952.5 Ops/sec
Array addition with spread operator 4470022.5 Ops/sec
Array addition with slice and push 3631494.2 Ops/sec
Script Preparation code:
Tests:
  • Array clone with spread operator

  • Array clone with slice

  • Array addition with spread operator

  • Array addition with slice and push