Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.137 Safari/537.36 Vivaldi/2.7.1628.33
Chrome 76
Linux
Desktop
4 years ago
Test name Executions per second
Array.prototype.slice [direct call] 3200996.8 Ops/sec
Array.prototype.slice [saved function call] 2506980.0 Ops/sec
Array.prototype.concat [direct call] 2300550.0 Ops/sec
Array.prototype.concat [saved function call] 1654869.2 Ops/sec
Spread operator 3891942.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