Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.3 Safari/605.1.15
Safari 14
Mac OS X 10.15.6
Desktop
3 years ago
Test name Executions per second
Array.prototype.slice [direct call] 9985937.0 Ops/sec
Array.prototype.slice [saved function call] 5224076.0 Ops/sec
Array.prototype.concat [direct call] 6440501.0 Ops/sec
Array.prototype.concat [saved function call] 3837949.2 Ops/sec
Spread operator 6432413.5 Ops/sec
Script Preparation code:
Tests:
  • Array.prototype.slice [direct call]

  • Array.prototype.slice [saved function call]

  • Array.prototype.concat [direct call]

  • Array.prototype.concat [saved function call]

  • Spread operator